public class HttpChannelState
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
HttpChannelState.Action |
The actions to take as the channel moves from state to state.
|
static class |
HttpChannelState.State |
The state of the HttpChannel,used to control the overall lifecycle.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
HttpChannelState(HttpChannel channel) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addListener(AsyncListener listener) |
|
void |
asyncError(java.lang.Throwable failure) |
|
protected void |
cancelTimeout() |
|
protected void |
cancelTimeout(AsyncContextEvent event) |
|
void |
complete() |
|
void |
dispatch(ServletContext context,
java.lang.String path) |
|
void |
errorComplete() |
|
AsyncContextEvent |
getAsyncContextEvent() |
|
java.lang.Object |
getAttribute(java.lang.String name) |
|
Request |
getBaseRequest() |
|
ContextHandler |
getContextHandler() |
|
HttpChannel |
getHttpChannel() |
|
ServletResponse |
getServletResponse() |
|
ServletResponse |
getServletResponse(AsyncContextEvent event) |
|
HttpChannelState.State |
getState() |
|
java.lang.String |
getStatusString() |
|
long |
getTimeout() |
|
protected HttpChannelState.Action |
handling() |
|
boolean |
isAsync() |
|
boolean |
isAsyncComplete() |
|
boolean |
isAsyncStarted() |
|
boolean |
isExpired() |
|
boolean |
isIdle() |
|
boolean |
isInitial() |
|
boolean |
isSuspended() |
|
protected void |
onComplete() |
|
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() |
|
protected void |
recycle() |
|
void |
removeAttribute(java.lang.String name) |
|
protected void |
scheduleDispatch() |
|
void |
setAttribute(java.lang.String name,
java.lang.Object attribute) |
|
void |
setTimeout(long ms) |
|
void |
startAsync(AsyncContextEvent event) |
|
java.lang.String |
toString() |
|
java.lang.String |
toStringLocked() |
|
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(AsyncListener listener)
public void setTimeout(long ms)
public long getTimeout()
public AsyncContextEvent getAsyncContextEvent()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringLocked()
public java.lang.String getStatusString()
protected HttpChannelState.Action handling()
public void startAsync(AsyncContextEvent event)
public void asyncError(java.lang.Throwable failure)
protected HttpChannelState.Action unhandle()
public void dispatch(ServletContext context, java.lang.String path)
protected void onTimeout()
public void complete()
public void errorComplete()
protected void onError(java.lang.Throwable th)
protected void onComplete()
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 isAsyncComplete()
public boolean isAsync()
public Request getBaseRequest()
public HttpChannel getHttpChannel()
public ContextHandler getContextHandler()
public ServletResponse getServletResponse()
public 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–2018 Webtide. All rights reserved.