public class HttpChannelState
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpChannelState.Action
The actions to take as the channel moves from state to state.
|
static class |
HttpChannelState.State |
Modifier | Constructor and Description |
---|---|
protected |
HttpChannelState(HttpChannel channel) |
Modifier and Type | Method and Description |
---|---|
boolean |
abortResponse() |
void |
addListener(javax.servlet.AsyncListener listener) |
void |
asyncError(java.lang.Throwable failure) |
protected void |
cancelTimeout() |
protected void |
cancelTimeout(AsyncContextEvent event) |
boolean |
commitResponse() |
void |
complete() |
protected void |
completed() |
boolean |
completeResponse() |
protected void |
completing() |
void |
dispatch(javax.servlet.ServletContext context,
java.lang.String path) |
AsyncContextEvent |
getAsyncContextEvent() |
java.lang.Object |
getAttribute(java.lang.String name) |
Request |
getBaseRequest() |
ContextHandler |
getContextHandler() |
HttpChannel |
getHttpChannel() |
javax.servlet.ServletResponse |
getServletResponse() |
javax.servlet.ServletResponse |
getServletResponse(AsyncContextEvent event) |
HttpChannelState.State |
getState() |
java.lang.String |
getStatusString() |
long |
getTimeout() |
HttpChannelState.Action |
handling() |
boolean |
hasListener(javax.servlet.AsyncListener listener) |
boolean |
isAsync() |
boolean |
isAsyncStarted() |
boolean |
isExpired() |
boolean |
isIdle() |
boolean |
isInitial() |
boolean |
isResponseCommitted() |
boolean |
isResponseCompleted() |
boolean |
isSendError() |
boolean |
isSuspended() |
boolean |
onContentAdded()
Called to signal that content is now available to read.
|
protected void |
onError(java.lang.Throwable th) |
boolean |
onReadEof()
Called to signal that a read has read -1.
|
boolean |
onReadPossible()
Called to indicate that more content may be available,
but that a handling thread may need to produce (fill/parse)
it.
|
boolean |
onReadReady()
Called to signal that the channel is ready for a callback.
|
void |
onReadUnready()
Called to signal async read isReady() has returned false.
|
protected void |
onTimeout() |
boolean |
onWritePossible() |
boolean |
partialResponse() |
protected void |
recycle() |
void |
removeAttribute(java.lang.String name) |
protected void |
scheduleDispatch() |
void |
sendError(int code,
java.lang.String message) |
void |
setAttribute(java.lang.String name,
java.lang.Object attribute) |
void |
setTimeout(long ms) |
void |
startAsync(AsyncContextEvent event) |
protected void |
timeout() |
java.lang.String |
toString() |
protected HttpChannelState.Action |
unhandle()
Signal that the HttpConnection has finished handling the request.
|
void |
upgrade() |
protected HttpChannelState(HttpChannel channel)
public HttpChannelState.State getState()
public void addListener(javax.servlet.AsyncListener listener)
public boolean hasListener(javax.servlet.AsyncListener listener)
public boolean isSendError()
public void setTimeout(long ms)
public long getTimeout()
public AsyncContextEvent getAsyncContextEvent()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getStatusString()
public boolean commitResponse()
public boolean partialResponse()
public boolean completeResponse()
public boolean isResponseCommitted()
public boolean isResponseCompleted()
public boolean abortResponse()
public HttpChannelState.Action handling()
protected HttpChannelState.Action unhandle()
public void startAsync(AsyncContextEvent event)
public void dispatch(javax.servlet.ServletContext context, java.lang.String path)
protected void timeout()
protected void onTimeout()
public void complete()
public void asyncError(java.lang.Throwable failure)
protected void onError(java.lang.Throwable th)
public void sendError(int code, java.lang.String message)
protected void completing()
protected void completed()
protected void recycle()
public void upgrade()
protected void scheduleDispatch()
protected void cancelTimeout()
protected void cancelTimeout(AsyncContextEvent event)
public boolean isIdle()
public boolean isExpired()
public boolean isInitial()
public boolean isSuspended()
public boolean isAsyncStarted()
public boolean isAsync()
public Request getBaseRequest()
public HttpChannel getHttpChannel()
public ContextHandler getContextHandler()
public javax.servlet.ServletResponse getServletResponse()
public javax.servlet.ServletResponse getServletResponse(AsyncContextEvent event)
public java.lang.Object getAttribute(java.lang.String name)
public void removeAttribute(java.lang.String name)
public void setAttribute(java.lang.String name, java.lang.Object attribute)
public void onReadUnready()
HttpChannel.onAsyncWaitForContent()
either from this method or from a subsequent call to unhandle()
.public boolean onContentAdded()
public boolean onReadReady()
onReadUnready()
followed by
onContentAdded()
, except that as content is already
available, read interest is never set.public boolean onReadPossible()
true
if more content may be availablepublic boolean onReadEof()
true
if wokenpublic boolean onWritePossible()
Copyright © 1995–2020 Webtide. All rights reserved.