org.eclipse.jetty.server
Class AsyncContinuation
java.lang.Object
org.eclipse.jetty.server.AsyncContinuation
- All Implemented Interfaces:
- Continuation, AsyncContext
public class AsyncContinuation
- extends Object
- implements AsyncContext, Continuation
Implementation of Continuation and AsyncContext interfaces.
_connection
protected HttpConnection _connection
AsyncContinuation
protected AsyncContinuation()
setConnection
protected void setConnection(HttpConnection connection)
addContinuationListener
public void addContinuationListener(ContinuationListener listener)
- Specified by:
addContinuationListener
in interface Continuation
- Specified by:
addContinuationListener
in interface AsyncContext
setTimeout
public void setTimeout(long ms)
- Specified by:
setTimeout
in interface Continuation
- Specified by:
setTimeout
in interface AsyncContext
getTimeout
public long getTimeout()
getAsyncEventState
public AsyncContinuation.AsyncEventState getAsyncEventState()
isResponseWrapped
public boolean isResponseWrapped()
- Specified by:
isResponseWrapped
in interface Continuation
- See Also:
Continuation.isResponseWrapped()
isInitial
public boolean isInitial()
- Specified by:
isInitial
in interface Continuation
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended
in interface Continuation
toString
public String toString()
- Overrides:
toString
in class Object
getStatusString
public String getStatusString()
handling
protected boolean handling()
- Returns:
- false if the handling of the request should not proceed
suspend
protected void suspend(javax.servlet.ServletContext context,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
unhandle
protected boolean unhandle()
- Signal that the HttpConnection has finished handling the request.
For blocking connectors, this call may block if the request has
been suspended (startAsync called).
- Returns:
- true if handling is complete, false if the request should
be handled again (eg because of a resume that happened before unhandle was called)
dispatch
public void dispatch()
- Specified by:
dispatch
in interface AsyncContext
expired
protected void expired()
complete
public void complete()
- Specified by:
complete
in interface Continuation
- Specified by:
complete
in interface AsyncContext
doComplete
protected void doComplete()
recycle
protected void recycle()
cancel
public void cancel()
scheduleDispatch
protected void scheduleDispatch()
scheduleTimeout
protected void scheduleTimeout()
cancelTimeout
protected void cancelTimeout()
isCompleting
public boolean isCompleting()
isComplete
public boolean isComplete()
isAsyncStarted
public boolean isAsyncStarted()
isAsync
public boolean isAsync()
dispatch
public void dispatch(javax.servlet.ServletContext context,
String path)
- Specified by:
dispatch
in interface AsyncContext
dispatch
public void dispatch(String path)
- Specified by:
dispatch
in interface AsyncContext
getBaseRequest
public Request getBaseRequest()
getRequest
public javax.servlet.ServletRequest getRequest()
- Specified by:
getRequest
in interface AsyncContext
getResponse
public javax.servlet.ServletResponse getResponse()
- Specified by:
getResponse
in interface AsyncContext
start
public void start(Runnable run)
- Specified by:
start
in interface AsyncContext
hasOriginalRequestAndResponse
public boolean hasOriginalRequestAndResponse()
- Specified by:
hasOriginalRequestAndResponse
in interface AsyncContext
getContextHandler
public ContextHandler getContextHandler()
isResumed
public boolean isResumed()
- Specified by:
isResumed
in interface Continuation
- See Also:
Continuation.isResumed()
isExpired
public boolean isExpired()
- Specified by:
isExpired
in interface Continuation
- See Also:
Continuation.isExpired()
resume
public void resume()
- Specified by:
resume
in interface Continuation
- See Also:
Continuation.resume()
suspend
public void suspend(javax.servlet.ServletResponse response)
- Specified by:
suspend
in interface Continuation
- See Also:
Continuation.suspend()
suspend
public void suspend()
- Specified by:
suspend
in interface Continuation
- See Also:
Continuation.suspend()
getServletResponse
public javax.servlet.ServletResponse getServletResponse()
- Specified by:
getServletResponse
in interface Continuation
- See Also:
Continuation.getServletResponse()
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttribute
in interface Continuation
- See Also:
Continuation.getAttribute(java.lang.String)
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interface Continuation
- See Also:
Continuation.removeAttribute(java.lang.String)
setAttribute
public void setAttribute(String name,
Object attribute)
- Specified by:
setAttribute
in interface Continuation
- See Also:
Continuation.setAttribute(java.lang.String, java.lang.Object)
undispatch
public void undispatch()
- Specified by:
undispatch
in interface Continuation
- See Also:
Continuation.undispatch()
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.