Package org.apache.cxf.transport.http
Class Servlet3ContinuationProvider.Servlet3Continuation
- java.lang.Object
-
- org.apache.cxf.transport.http.Servlet3ContinuationProvider.Servlet3Continuation
-
- All Implemented Interfaces:
EventListener,javax.servlet.AsyncListener,Continuation
- Direct Known Subclasses:
Servlet3ContinuationProvider.Servlet31Continuation
- Enclosing class:
- Servlet3ContinuationProvider
public class Servlet3ContinuationProvider.Servlet3Continuation extends Object implements Continuation, javax.servlet.AsyncListener
-
-
Constructor Summary
Constructors Constructor Description Servlet3Continuation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetObject()Get arbitrary object associated with the continuation for contextprotected javax.servlet.ServletOutputStreamgetOutputStream()booleanisNew()Is this a newly created Continuation.booleanisPending()Get the pending statusbooleanisReadyForWrite()booleanisResumed()Get the resumed statusbooleanisTimeout()Get the timeout statusvoidonComplete(javax.servlet.AsyncEvent event)voidonError(javax.servlet.AsyncEvent event)voidonStartAsync(javax.servlet.AsyncEvent event)voidonTimeout(javax.servlet.AsyncEvent event)voidredispatch()voidreset()Reset the continuationvoidresume()Resume a suspended requestvoidsetObject(Object o)Sets arbitrary object associated with the continuation for contextbooleansuspend(long timeout)This method will suspend the request for the timeout or until resume is calledprotected voidupdateMessageForSuspend()
-
-
-
Method Detail
-
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
public Object 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
public void setObject(Object o)
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
public void onComplete(javax.servlet.AsyncEvent event) throws IOException- Specified by:
onCompletein interfacejavax.servlet.AsyncListener- Throws:
IOException
-
onError
public void onError(javax.servlet.AsyncEvent event) throws IOException- Specified by:
onErrorin interfacejavax.servlet.AsyncListener- Throws:
IOException
-
onStartAsync
public void onStartAsync(javax.servlet.AsyncEvent event) throws IOException- Specified by:
onStartAsyncin interfacejavax.servlet.AsyncListener- Throws:
IOException
-
onTimeout
public void onTimeout(javax.servlet.AsyncEvent event) throws IOException- Specified by:
onTimeoutin interfacejavax.servlet.AsyncListener- Throws:
IOException
-
isReadyForWrite
public boolean isReadyForWrite()
- Specified by:
isReadyForWritein interfaceContinuation
-
getOutputStream
protected javax.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.
-
-