public class HttpChannelState extends 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
The state of the HttpChannel,used to control the overall lifecycle.
|
Modifier | Constructor and Description |
---|---|
protected |
HttpChannelState(HttpChannel channel) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(AsyncListener listener) |
void |
asyncError(Throwable failure) |
protected void |
cancelTimeout() |
protected void |
cancelTimeout(AsyncContextEvent event) |
void |
complete() |
void |
dispatch(ServletContext context,
String path) |
void |
errorComplete() |
AsyncContextEvent |
getAsyncContextEvent() |
Object |
getAttribute(String name) |
Request |
getBaseRequest() |
ContextHandler |
getContextHandler() |
HttpChannel |
getHttpChannel() |
ServletResponse |
getServletResponse() |
ServletResponse |
getServletResponse(AsyncContextEvent event) |
HttpChannelState.State |
getState() |
String |
getStatusString() |
long |
getTimeout() |
protected HttpChannelState.Action |
handling() |
boolean |
isAsync() |
boolean |
isAsyncComplete() |
boolean |
isAsyncStarted() |
boolean |
isExpired() |
boolean |
isIdle() |
boolean |
isInitial() |
boolean |
isReadPossible() |
boolean |
isSuspended() |
protected void |
onComplete() |
protected void |
onError(Throwable failure) |
boolean |
onReadEof()
Called to signal that a read has read -1.
|
boolean |
onReadPossible()
Called to signal that content is now available to read.
|
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(String name) |
protected void |
scheduleDispatch() |
void |
setAttribute(String name,
Object attribute) |
void |
setTimeout(long ms) |
void |
startAsync(AsyncContextEvent event) |
String |
toString() |
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 String toStringLocked()
public String getStatusString()
protected HttpChannelState.Action handling()
public void startAsync(AsyncContextEvent event)
public void asyncError(Throwable failure)
protected HttpChannelState.Action unhandle()
public void dispatch(ServletContext context, String path)
protected void onTimeout()
public void complete()
public void errorComplete()
protected void onError(Throwable failure)
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 void removeAttribute(String name)
public void onReadUnready()
HttpChannel.asyncReadFillInterested()
either from this method or from a subsequent call to unhandle()
.public boolean onReadPossible()
public boolean onReadReady()
onReadUnready()
followed by
onReadPossible()
, except that as content is already
available, read interest is never set.public boolean onReadEof()
public boolean isReadPossible()
public boolean onWritePossible()
Copyright © 1995–2017 Webtide. All rights reserved.