Package org.eclipse.jetty.ee10.servlet
Class ServletChannelState
java.lang.Object
org.eclipse.jetty.ee10.servlet.ServletChannelState
holder of the state of request-response cycle.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The actions to take as the channel moves from state to state.static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addListener
(jakarta.servlet.AsyncListener listener) void
asyncError
(Throwable failure) This method is called when a failure occurs asynchronously to normal handling.protected void
protected void
cancelTimeout
(AsyncContextEvent event) void
complete()
protected void
protected void
void
getAttribute
(String name) getState()
long
handling()
boolean
hasListener
(jakarta.servlet.AsyncListener listener) boolean
boolean
isAsync()
boolean
boolean
boolean
isIdle()
boolean
boolean
boolean
boolean
boolean
boolean
protected boolean
boolean
onIdleTimeout
(TimeoutException timeout) void
Called to indicate that the content is being consumed.boolean
boolean
Called to signal that the channel is ready for a callback.void
Called to indicate that no content is currently available, more content has been demanded and may be available, but that a handling thread may need to produce (fill/parse) it.protected void
boolean
void
protected void
recycle()
void
removeAttribute
(String name) protected void
void
void
setAttribute
(String name, Object attribute) void
setTimeout
(long ms) void
startAsync
(AsyncContextEvent event) protected void
timeout()
toString()
protected ServletChannelState.Action
unhandle()
Signal that the HttpConnection has finished handling the request.void
upgrade()
-
Constructor Details
-
ServletChannelState
-
-
Method Details
-
getServletChannel
-
isAborted
public boolean isAborted() -
openOutput
public void openOutput() -
getState
-
addListener
public void addListener(jakarta.servlet.AsyncListener listener) -
hasListener
public boolean hasListener(jakarta.servlet.AsyncListener listener) -
isSendError
public boolean isSendError() -
setTimeout
public void setTimeout(long ms) -
getTimeout
public long getTimeout() -
getAsyncContextEvent
-
toString
-
getStatusString
-
completeResponse
-
isResponseCommitted
public boolean isResponseCommitted() -
isResponseCompleted
public boolean isResponseCompleted() -
abort
-
handling
- Returns:
- Next handling of the request should proceed
-
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:
- next actions be handled again (e.g. because of a resume that happened before unhandle was called)
-
startAsync
-
dispatch
-
timeout
protected void timeout() -
onTimeout
protected void onTimeout() -
complete
public void complete() -
asyncError
This method is called when a failure occurs asynchronously to normal handling. If the request is async, we arrange for the exception to be thrown from the normal handling loop and then actually handled byonError(Throwable)
- Parameters:
failure
- the error.
-
onIdleTimeout
-
onError
-
sendError
-
completing
protected void completing() -
completed
-
recycle
protected void recycle() -
upgrade
public void upgrade() -
scheduleDispatch
protected void scheduleDispatch() -
cancelTimeout
protected void cancelTimeout() -
cancelTimeout
-
isIdle
public boolean isIdle() -
isExpired
public boolean isExpired() -
isInitial
public boolean isInitial() -
isSuspended
public boolean isSuspended() -
isAsyncStarted
public boolean isAsyncStarted() -
isAsync
public boolean isAsync() -
getContextHandler
-
getAttribute
-
removeAttribute
-
setAttribute
-
onReadReady
public boolean onReadReady()Called to signal that the channel is ready for a callback.- Returns:
- true if woken
-
onReadListenerReady
public boolean onReadListenerReady() -
onReadIdle
public void onReadIdle()Called to indicate that the content is being consumed. -
onReadUnready
public void onReadUnready()Called to indicate that no content is currently available, more content has been demanded and may be available, but that a handling thread may need to produce (fill/parse) it. -
isInputUnready
public boolean isInputUnready() -
onWritePossible
public boolean onWritePossible()
-