Package org.apache.cxf.transport.http
Class Servlet3ContinuationProvider.Servlet3Continuation
java.lang.Object
org.apache.cxf.transport.http.Servlet3ContinuationProvider.Servlet3Continuation
- All Implemented Interfaces:
jakarta.servlet.AsyncListener,EventListener,Continuation
- Direct Known Subclasses:
Servlet3ContinuationProvider.Servlet31Continuation
- Enclosing class:
- Servlet3ContinuationProvider
public class Servlet3ContinuationProvider.Servlet3Continuation
extends Object
implements Continuation, jakarta.servlet.AsyncListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet arbitrary object associated with the continuation for contextprotected jakarta.servlet.ServletOutputStreambooleanisNew()Is this a newly created Continuation.booleanGet the pending statusbooleanbooleanGet the resumed statusbooleanGet the timeout statusvoidonComplete(jakarta.servlet.AsyncEvent event) voidonError(jakarta.servlet.AsyncEvent event) voidonStartAsync(jakarta.servlet.AsyncEvent event) voidonTimeout(jakarta.servlet.AsyncEvent event) voidvoidreset()Reset the continuationvoidresume()Resume a suspended requestvoidSets arbitrary object associated with the continuation for contextbooleansuspend(long timeout) This method will suspend the request for the timeout or until resume is calledprotected void
-
Constructor Details
-
Servlet3Continuation
public Servlet3Continuation()
-
-
Method Details
-
suspend
public boolean suspend(long timeout) Description copied from interface:ContinuationThis method will suspend the request for the timeout or until resume is called- Specified by:
suspendin interfaceContinuation- Parameters:
timeout- the suspend timeout, timeout of 0 will suspend the request indefinitely.- Returns:
- true if suspend was successful.
-
updateMessageForSuspend
protected void updateMessageForSuspend() -
redispatch
public void redispatch() -
resume
public void resume()Description copied from interface:ContinuationResume a suspended request- Specified by:
resumein interfaceContinuation
-
reset
public void reset()Description copied from interface:ContinuationReset the continuation- Specified by:
resetin interfaceContinuation
-
isNew
public boolean isNew()Description copied from interface:ContinuationIs this a newly created Continuation.- Specified by:
isNewin interfaceContinuation- Returns:
- true if the continuation has just been created and has not yet suspended the request.
-
isPending
public boolean isPending()Description copied from interface:ContinuationGet the pending status- Specified by:
isPendingin interfaceContinuation- Returns:
- true if the continuation has been suspended.
-
isResumed
public boolean isResumed()Description copied from interface:ContinuationGet the resumed status- Specified by:
isResumedin interfaceContinuation- Returns:
- true if the continuation is has been resumed.
-
getObject
Description copied from interface:ContinuationGet arbitrary object associated with the continuation for context- Specified by:
getObjectin interfaceContinuation- Returns:
- An arbitrary object associated with the continuation
-
setObject
Description copied from interface:ContinuationSets arbitrary object associated with the continuation for context- Specified by:
setObjectin interfaceContinuation- Parameters:
o- An arbitrary object to associate with the continuation
-
onComplete
- Specified by:
onCompletein interfacejakarta.servlet.AsyncListener- Throws:
IOException
-
onError
- Specified by:
onErrorin interfacejakarta.servlet.AsyncListener- Throws:
IOException
-
onStartAsync
- Specified by:
onStartAsyncin interfacejakarta.servlet.AsyncListener- Throws:
IOException
-
onTimeout
- Specified by:
onTimeoutin interfacejakarta.servlet.AsyncListener- Throws:
IOException
-
isReadyForWrite
public boolean isReadyForWrite()- Specified by:
isReadyForWritein interfaceContinuation
-
getOutputStream
protected jakarta.servlet.ServletOutputStream getOutputStream() -
isTimeout
public boolean isTimeout()Description copied from interface:ContinuationGet the timeout status- Specified by:
isTimeoutin interfaceContinuation- Returns:
- true if the continuation is has been timeout.
-