Top Description Inners Fields Constructors Methods
org.eclipse.jetty.server.internal

public Class HttpChannelState

extends Object
implements HttpChannel, Components
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.server.Components, org.eclipse.jetty.server.HttpChannel, org.eclipse.jetty.util.thread.Invocable
Imports
java.io.IOException, java.nio.ByteBuffer, java.nio.channels.WritePendingException, java.util.ArrayList, .HashMap, .List, .Objects, java.util.concurrent.CompletableFuture, .TimeoutException, java.util.concurrent.atomic.LongAdder, java.util.function.Consumer, .Function, .Predicate, .Supplier, org.eclipse.jetty.http.BadMessageException, .ComplianceViolation, .HttpField, .HttpFields, .HttpHeader, .HttpMethod, .HttpScheme, .HttpStatus, .HttpURI, .HttpVersion, .MetaData, .MultiPartFormData.Parts, .Trailers, .UriCompliance, org.eclipse.jetty.io.ByteBufferPool, .Content, org.eclipse.jetty.server.Components, .ConnectionMetaData, .Context, .Handler, .HttpChannel, .HttpConfiguration, .HttpStream, .Request, .RequestLog, .Response, .Server, .Session, .TunnelSupport, org.eclipse.jetty.util.Attributes, .BufferUtil, .Callback, .ExceptionUtil, .NanoTime, org.eclipse.jetty.util.thread.AutoLock, .Invocable, .Scheduler, .SerializedInvoker, .ThreadPool, org.slf4j.Logger, .LoggerFactory

A Channel represents a sequence of request cycles from the same connection with only a single request cycle may be active at once for each channel.

Many methods return Runnables to indicate that further work is needed. These can be given to an ExecutionStrategy instead of calling known methods like HttpChannel.handle().

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class
public static class
HttpChannelState.ChannelResponse

The Channel's implementation of the Response API.

private static class
private static class
private class
private class
private static class
private static class
private static enum
HttpChannelState.StreamSendState

The state of the written response

Field Summary

Modifier and TypeField and Description
private Attributes
private boolean
private Throwable
private long
private ComplianceViolation.Listener
private final ConnectionMetaData
private boolean
private boolean
private final HttpChannelState.HandlerInvoker
private Thread
private final AutoLock
private long
private Runnable
private Consumer<Throwable>
private Predicate<TimeoutException>
private Content.Chunk
private final SerializedInvoker
private HttpChannelState.ChannelRequest
private HttpChannelState.ChannelResponse
private final ResponseHttpFields
private HttpStream
private HttpChannelState.StreamSendState
private final SerializedInvoker
private static final Logger
private static final Throwable
private static final HttpField
private static final HttpField

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public ByteBufferPool
public Attributes
getCache()

Implements org.eclipse.jetty.server.Components.getCache.

A Map which can be used as a cache for object (e.g. Cookie cache).

public ComplianceViolation.Listener
public ConnectionMetaData
public HttpConfiguration
public HttpStream
public Invocable.InvocationType
public Request
getRequest()

Implements org.eclipse.jetty.server.HttpChannel.getRequest.

Returns the Request object, if available.

public Response
public Scheduler
public Server
public ThreadPool
public void
initialize()

Implements org.eclipse.jetty.server.HttpChannel.initialize.

Initialize the HttpChannel when a new cycle of request handling begins.

public boolean
private boolean
private boolean
private Throwable
lockedStreamSend(boolean last, long length)

private void
lockedStreamSendCompleted(boolean success)

public Runnable
onContentAvailable()

Implements org.eclipse.jetty.server.HttpChannel.onContentAvailable.

HttpStream invokes this method when more HTTP request content is available.

public Runnable
onFailure(Throwable
the failure cause.
x
)

Implements org.eclipse.jetty.server.HttpChannel.onFailure.

Notifies this HttpChannel that an asynchronous failure happened.

public Runnable
onIdleTimeout(TimeoutException
the timeout.
t
)

Implements org.eclipse.jetty.server.HttpChannel.onIdleTimeout.

Notifies this HttpChannel that an idle timeout happened.

public Runnable

Returns:

A Runnable that will call Handler#handle(Request, Response, Callback). Unlike all other Runnables returned by HttpChannel methods, this runnable should not be mutually excluded or serialized. Specifically other Runnables returned by methods on this class can be run concurrently with the Runnable returned from this method.
onRequest
(MetaData.Request
The request metadata to handle.
request
)

Implements org.eclipse.jetty.server.HttpChannel.onRequest.

Start request handling by returning a Runnable that will call Handler#handle(Request, Response, Callback).

public void
recycle()

Implements org.eclipse.jetty.server.HttpChannel.recycle.

Recycle the HttpChannel, so that a new cycle of calling setHttpStream(HttpStream), onRequest(MetaData.Request) etc. may be performed on the channel.

private void
public void
setHttpStream(HttpStream
the HttpStream to associate to this channel.
stream
)

Implements org.eclipse.jetty.server.HttpChannel.setHttpStream.

Set the HttpStream to associate to this channel..

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait