org.eclipse.jetty.server
Class AsyncContinuation
java.lang.Object
org.eclipse.jetty.server.AsyncContinuation
- All Implemented Interfaces:
- javax.servlet.AsyncContext, Continuation
public class AsyncContinuation
- extends java.lang.Object
- implements javax.servlet.AsyncContext, Continuation
Implementation of Continuation and AsyncContext interfaces
| Fields inherited from interface javax.servlet.AsyncContext |
ASYNC_CONTEXT_PATH, ASYNC_PATH_INFO, ASYNC_QUERY_STRING, ASYNC_REQUEST_URI, ASYNC_SERVLET_PATH |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_connection
protected HttpConnection _connection
AsyncContinuation
protected AsyncContinuation()
setConnection
protected void setConnection(HttpConnection connection)
addListener
public void addListener(javax.servlet.AsyncListener listener)
- Specified by:
addListener in interface javax.servlet.AsyncContext
addListener
public void addListener(javax.servlet.AsyncListener listener,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
- Specified by:
addListener in interface javax.servlet.AsyncContext
addContinuationListener
public void addContinuationListener(ContinuationListener listener)
- Specified by:
addContinuationListener in interface Continuation
setTimeout
public void setTimeout(long ms)
- Specified by:
setTimeout in interface javax.servlet.AsyncContext- Specified by:
setTimeout in interface Continuation
getTimeout
public long getTimeout()
- Specified by:
getTimeout in interface javax.servlet.AsyncContext
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 java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getStatusString
public java.lang.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 javax.servlet.AsyncContext
expired
protected void expired()
complete
public void complete()
- Specified by:
complete in interface javax.servlet.AsyncContext- Specified by:
complete in interface Continuation
createListener
public <T extends javax.servlet.AsyncListener> T createListener(java.lang.Class<T> clazz)
throws javax.servlet.ServletException
- Specified by:
createListener in interface javax.servlet.AsyncContext
- Throws:
javax.servlet.ServletException
doComplete
protected void doComplete(java.lang.Throwable ex)
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,
java.lang.String path)
- Specified by:
dispatch in interface javax.servlet.AsyncContext
dispatch
public void dispatch(java.lang.String path)
- Specified by:
dispatch in interface javax.servlet.AsyncContext
getBaseRequest
public Request getBaseRequest()
getRequest
public javax.servlet.ServletRequest getRequest()
- Specified by:
getRequest in interface javax.servlet.AsyncContext
getResponse
public javax.servlet.ServletResponse getResponse()
- Specified by:
getResponse in interface javax.servlet.AsyncContext
start
public void start(java.lang.Runnable run)
- Specified by:
start in interface javax.servlet.AsyncContext
hasOriginalRequestAndResponse
public boolean hasOriginalRequestAndResponse()
- Specified by:
hasOriginalRequestAndResponse in interface javax.servlet.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 java.lang.Object getAttribute(java.lang.String name)
- Specified by:
getAttribute in interface Continuation
- See Also:
Continuation.getAttribute(java.lang.String)
removeAttribute
public void removeAttribute(java.lang.String name)
- Specified by:
removeAttribute in interface Continuation
- See Also:
Continuation.removeAttribute(java.lang.String)
setAttribute
public void setAttribute(java.lang.String name,
java.lang.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-2010 Mort Bay Consulting. All Rights Reserved.