Apache CXF API

org.apache.cxf.transport.http_jetty.continuations
Class JettyContinuationWrapper

java.lang.Object
  extended by org.apache.cxf.transport.http_jetty.continuations.JettyContinuationWrapper
All Implemented Interfaces:
EventListener, Continuation, org.eclipse.jetty.continuation.ContinuationListener

public class JettyContinuationWrapper
extends Object
implements Continuation, org.eclipse.jetty.continuation.ContinuationListener


Constructor Summary
JettyContinuationWrapper(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse resp, Message m)
           
 
Method Summary
protected  Message getMessage()
           
 Object getObject()
          Get arbitrary object associated with the continuation for context
 boolean isNew()
          Is this a newly created Continuation.
 boolean isPending()
          Get the pending status
 boolean isResumed()
          Get the resumed status
 void onComplete(org.eclipse.jetty.continuation.Continuation continuation)
           
 void onTimeout(org.eclipse.jetty.continuation.Continuation continuation)
           
 void reset()
          Reset the continuation
 void resume()
          Resume a suspended request
 void setObject(Object userObject)
          Sets arbitrary object associated with the continuation for context
 boolean suspend(long timeout)
          This method will suspend the request for the timeout or until resume is called
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JettyContinuationWrapper

public JettyContinuationWrapper(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse resp,
                                Message m)
Method Detail

getObject

public Object getObject()
Description copied from interface: Continuation
Get arbitrary object associated with the continuation for context

Specified by:
getObject in interface Continuation
Returns:
An arbitrary object associated with the continuation

setObject

public void setObject(Object userObject)
Description copied from interface: Continuation
Sets arbitrary object associated with the continuation for context

Specified by:
setObject in interface Continuation
Parameters:
userObject - An arbitrary object to associate with the continuation

resume

public void resume()
Description copied from interface: Continuation
Resume a suspended request

Specified by:
resume in interface Continuation

isNew

public boolean isNew()
Description copied from interface: Continuation
Is this a newly created Continuation.

Specified by:
isNew in interface Continuation
Returns:
True if the continuation has just been created and has not yet suspended the request.

isPending

public boolean isPending()
Description copied from interface: Continuation
Get the pending status

Specified by:
isPending in interface Continuation
Returns:
True if the continuation has been suspended.

isResumed

public boolean isResumed()
Description copied from interface: Continuation
Get the resumed status

Specified by:
isResumed in interface Continuation
Returns:
True if the continuation is has been resumed.

reset

public void reset()
Description copied from interface: Continuation
Reset the continuation

Specified by:
reset in interface Continuation

suspend

public boolean suspend(long timeout)
Description copied from interface: Continuation
This method will suspend the request for the timeout or until resume is called

Specified by:
suspend in interface Continuation
Parameters:
timeout - A timeout of < 0 will cause an immediate return. A timeout of 0 will wait indefinitely.
Returns:
True if resume called or false if timeout.

getMessage

protected Message getMessage()

onComplete

public void onComplete(org.eclipse.jetty.continuation.Continuation continuation)
Specified by:
onComplete in interface org.eclipse.jetty.continuation.ContinuationListener

onTimeout

public void onTimeout(org.eclipse.jetty.continuation.Continuation continuation)
Specified by:
onTimeout in interface org.eclipse.jetty.continuation.ContinuationListener

Apache CXF API

Apache CXF