Class HttpChannel
- All Implemented Interfaces:
Runnable,HttpOutput.Interceptor
- Direct Known Subclasses:
HttpChannelOverHttp
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.static classDeprecated. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpChannel(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransport transport) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.If a write or similar operation to this channel fails, then this method should be called.booleanaddListener(HttpChannel.Listener listener) Deprecated.voidaddRequestLog(RequestLog requestLog) Deprecated.voidcontinue100(int available) Deprecated.If the associated response has the Expect header set to 100 Continue, then accessing the input stream indicates that the handler/servlet is ready for the request body and thus a 100 Continue response is sent.voidDeprecated.Deprecated.longDeprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.longDeprecated.Get the idle timeout.Deprecated.Deprecated.Return the local name of the connected channel.intDeprecated.Return the Local Port of the connected channel.Deprecated.Deprecated.Deprecated.Deprecated.longDeprecated.Deprecated.Deprecated.Deprecated.Deprecated.getState()Deprecated.Deprecated.booleanhandle()Deprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.voidDeprecated.voidonBadMessage(BadMessageException failure) Deprecated.voidDeprecated.voidonBlockWaitForContentFailure(Throwable failure) Deprecated.voidDeprecated.booleanonContent(HttpInput.Content content) Deprecated.booleanDeprecated.booleanDeprecated.voidonRequest(MetaData.Request request) Deprecated.booleanDeprecated.voidonTrailers(HttpFields trailers) Deprecated.voidrecycle()Deprecated.booleanremoveListener(HttpChannel.Listener listener) Deprecated.voidDeprecated.Reset the buffers.voidrun()Deprecated.booleansendResponse(MetaData.Response info, ByteBuffer content, boolean complete) Deprecated.booleansendResponse(MetaData.Response info, ByteBuffer content, boolean complete, Callback callback) Deprecated.voidDeprecated.voidsetIdleTimeout(long timeoutMs) Deprecated.Set the idle timeout.voidsetRequestLog(RequestLog requestLog) Deprecated.toString()Deprecated.booleanDeprecated.voidwrite(ByteBuffer content, boolean complete, Callback callback) Deprecated.Non-Blocking write, committing the response if needed.
-
Field Details
-
NOOP_LISTENER
Deprecated.
-
-
Constructor Details
-
HttpChannel
public HttpChannel(Connector connector, HttpConfiguration configuration, EndPoint endPoint, HttpTransport transport) Deprecated.
-
-
Method Details
-
isSendError
public boolean isSendError()Deprecated. -
getState
Deprecated. -
addListener
Deprecated.Add a transient Listener to the HttpChannel.Listeners added by this method will only be notified if the HttpChannel has been constructed with an instance of
HttpChannel.TransientListenersas anAbstractConnectorprovided listenerTransient listeners are removed after every request cycle
- Parameters:
listener- the listener to add- Returns:
- true if the listener was added.
-
removeListener
Deprecated. -
getTransientListeners
Deprecated. -
getBytesWritten
public long getBytesWritten()Deprecated. -
getRequests
public long getRequests()Deprecated.- Returns:
- the number of requests handled by this connection
-
getConnector
Deprecated. -
getHttpTransport
Deprecated. -
getRequestLog
Deprecated. -
setRequestLog
Deprecated. -
addRequestLog
Deprecated. -
getCommittedMetaData
Deprecated. -
getIdleTimeout
public long getIdleTimeout()Deprecated.Get the idle timeout.This is implemented as a call to
EndPoint.getIdleTimeout(), but may be overridden by channels that have timeouts different from their connections.- Returns:
- the idle timeout (in milliseconds)
-
setIdleTimeout
public void setIdleTimeout(long timeoutMs) Deprecated.Set the idle timeout.This is implemented as a call to
EndPoint.setIdleTimeout(long), but may be overridden by channels that have timeouts different from their connections.- Parameters:
timeoutMs- the idle timeout in milliseconds
-
getByteBufferPool
Deprecated. -
getHttpConfiguration
Deprecated. -
isOptimizedForDirectBuffers
public boolean isOptimizedForDirectBuffers()Deprecated.- Specified by:
isOptimizedForDirectBuffersin interfaceHttpOutput.Interceptor- Returns:
- True if the Interceptor is optimized to receive direct
ByteBuffers in theHttpOutput.Interceptor.write(ByteBuffer, boolean, Callback)method. If false is returned, then passing direct buffers may cause inefficiencies.
-
getServer
Deprecated. -
getRequest
Deprecated. -
getResponse
Deprecated. -
getConnection
Deprecated. -
getEndPoint
Deprecated. -
getLocalName
Deprecated.Return the local name of the connected channel.
This is the host name after the connector is bound and the connection is accepted.
Value can be overridden by
HttpConfiguration.setLocalAddress(SocketAddress).Note: some connectors are not based on IP networking, and default behavior here will result in a null return. Use
HttpConfiguration.setLocalAddress(SocketAddress)to set the value to an acceptable host name.- Returns:
- the local name, or null
-
getLocalPort
public int getLocalPort()Deprecated.Return the Local Port of the connected channel.
This is the port the connector is bound to and is accepting connections on.
Value can be overridden by
HttpConfiguration.setLocalAddress(SocketAddress).Note: some connectors are not based on IP networking, and default behavior here will result in a value of 0 returned. Use
HttpConfiguration.setLocalAddress(SocketAddress)to set the value to an acceptable port.- Returns:
- the local port, or 0 if unspecified
-
getLocalAddress
Deprecated. -
getRemoteAddress
Deprecated. -
getServerAuthority
Deprecated.- Returns:
- return the HttpConfiguration server authority override
-
continue100
Deprecated.If the associated response has the Expect header set to 100 Continue, then accessing the input stream indicates that the handler/servlet is ready for the request body and thus a 100 Continue response is sent.- Parameters:
available- estimate of the number of bytes that are available- Throws:
IOException- if the InputStream cannot be created
-
recycle
public void recycle()Deprecated. -
onAsyncWaitForContent
public void onAsyncWaitForContent()Deprecated. -
onBlockWaitForContent
public void onBlockWaitForContent()Deprecated. -
onBlockWaitForContentFailure
Deprecated. -
run
public void run()Deprecated. -
handle
public boolean handle()Deprecated.- Returns:
- True if the channel is ready to continue handling (ie it is not suspended)
-
ensureConsumeAllOrNotPersistent
public void ensureConsumeAllOrNotPersistent()Deprecated. -
sendResponseAndComplete
public void sendResponseAndComplete()Deprecated. -
isExpecting100Continue
public boolean isExpecting100Continue()Deprecated. -
isExpecting102Processing
public boolean isExpecting102Processing()Deprecated. -
toString
Deprecated. -
onRequest
Deprecated. -
onContent
Deprecated. -
onContentComplete
public boolean onContentComplete()Deprecated. -
onTrailers
Deprecated. -
onRequestComplete
public boolean onRequestComplete()Deprecated. -
onCompleted
public void onCompleted()Deprecated. -
onEarlyEOF
public boolean onEarlyEOF()Deprecated. -
onBadMessage
Deprecated. -
sendResponse
public boolean sendResponse(MetaData.Response info, ByteBuffer content, boolean complete, Callback callback) Deprecated. -
sendResponse
public boolean sendResponse(MetaData.Response info, ByteBuffer content, boolean complete) throws IOException Deprecated.- Throws:
IOException
-
isCommitted
public boolean isCommitted()Deprecated. -
isRequestCompleted
public boolean isRequestCompleted()Deprecated.- Returns:
- True if the request lifecycle is completed
-
isResponseCompleted
public boolean isResponseCompleted()Deprecated.- Returns:
- True if the response is completely written.
-
isPersistent
public boolean isPersistent()Deprecated. -
write
Deprecated.Non-Blocking write, committing the response if needed.
Called as last link in HttpOutput.Filter chain- Specified by:
writein interfaceHttpOutput.Interceptor- Parameters:
content- the content buffer to writecomplete- whether the content is complete for the responsecallback- Callback when complete or failed
-
resetBuffer
public void resetBuffer()Deprecated.Description copied from interface:HttpOutput.InterceptorReset the buffers.If the Interceptor contains buffers then reset them.
- Specified by:
resetBufferin interfaceHttpOutput.Interceptor
-
getNextInterceptor
Deprecated.- Specified by:
getNextInterceptorin interfaceHttpOutput.Interceptor- Returns:
- The next Interceptor in the chain or null if this is the last Interceptor in the chain.
-
getScheduler
Deprecated. -
useDirectBuffers
public boolean useDirectBuffers()Deprecated.- Returns:
- true if the HttpChannel can efficiently use direct buffer (typically this means it is not over SSL or a multiplexed protocol)
-
abort
Deprecated.If a write or similar operation to this channel fails, then this method should be called.The standard implementation calls
HttpTransport.abort(Throwable).- Parameters:
failure- the failure that caused the abort.
-