Class ServletChannelState

java.lang.Object
org.eclipse.jetty.ee10.servlet.ServletChannelState

public class ServletChannelState extends Object
holder of the state of request-response cycle.
  • Constructor Details

    • ServletChannelState

      protected ServletChannelState(ServletChannel servletChannel)
  • Method Details

    • getServletChannel

      public ServletChannel getServletChannel()
    • isAborted

      public boolean isAborted()
    • openOutput

      public void openOutput()
    • getState

      public ServletChannelState.State 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

      public AsyncContextEvent getAsyncContextEvent()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getStatusString

      public String getStatusString()
    • completeResponse

      public Throwable completeResponse()
    • isResponseCommitted

      public boolean isResponseCommitted()
    • isResponseCompleted

      public boolean isResponseCompleted()
    • abort

      public void abort(Throwable failure)
    • handling

      public ServletChannelState.Action handling()
      Returns:
      Next handling of the request should proceed
    • unhandle

      protected ServletChannelState.Action 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

      public void startAsync(AsyncContextEvent event)
    • dispatch

      public void dispatch(jakarta.servlet.ServletContext context, String path)
    • timeout

      protected void timeout()
    • onTimeout

      protected void onTimeout()
    • complete

      public void complete()
    • asyncError

      public void asyncError(Throwable failure)
      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 by onError(Throwable)
      Parameters:
      failure - the error.
    • onIdleTimeout

      public boolean onIdleTimeout(TimeoutException timeout)
    • onError

      protected boolean onError(Throwable th)
    • sendError

      public void sendError(int code, String message)
    • completing

      protected void completing()
    • completed

      protected void completed(Throwable failure)
    • recycle

      protected void recycle()
    • upgrade

      public void upgrade()
    • scheduleDispatch

      protected void scheduleDispatch()
    • cancelTimeout

      protected void cancelTimeout()
    • cancelTimeout

      protected void cancelTimeout(AsyncContextEvent event)
    • 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

      public ServletContextHandler getContextHandler()
    • getAttribute

      public Object getAttribute(String name)
    • removeAttribute

      public void removeAttribute(String name)
    • setAttribute

      public void setAttribute(String name, Object attribute)
    • 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()