Class HttpStream.Wrapper
java.lang.Object
org.eclipse.jetty.server.HttpStream.Wrapper
- All Implemented Interfaces:
 HttpStream, Callback, Invocable
- Enclosing interface:
 HttpStream
- 
Nested Class Summary
Nested classes/interfaces inherited from interface Callback
Callback.Combination, Callback.Completable, Callback.Completing, Callback.NestedNested classes/interfaces inherited from interface HttpStream
HttpStream.WrapperNested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task - 
Field Summary
Fields inherited from interface Callback
NOOP, NOT_CALLEDFields inherited from interface HttpStream
CONTENT_NOT_CONSUMED, UPGRADE_CONNECTION_ATTRIBUTEFields inherited from interface Invocable
__nonBlocking - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptioncancelSend(Throwable cause, Callback appCallback) Cancel anyHttpStream.send(MetaData.Request, MetaData.Response, boolean, ByteBuffer, Callback)call in progress.final Throwablevoiddemand()Demands more content chunks to the underlying implementation.voidCallback invoked when the operation fails.final StringgetId()longfinal booleanvoidprepareResponse(HttpFields.Mutable headers) Prepare the response headers with respect to the stream.voidpush(MetaData.Request resource) Pushes the givenresourceto the client.read()Reads a chunk of content, with the same semantic asContent.Source.read().voidsend(MetaData.Request request, MetaData.Response response, boolean last, ByteBuffer content, Callback callback) Send response meta-data and/or data.voidsetIdleTimeout(long idleTimeoutMs) voidCallback invoked when the operation completes.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Callback
completeWith 
- 
Constructor Details
- 
Wrapper
 
 - 
 - 
Method Details
- 
getWrapped
 - 
getId
- Specified by:
 getIdin interfaceHttpStream- Returns:
 - an ID unique within the lifetime scope of the associated protocol connection. This may be a protocol ID (e.g. HTTP/2 stream ID) or it may be unrelated to the protocol.
 
 - 
read
Description copied from interface:HttpStreamReads a chunk of content, with the same semantic as
Content.Source.read().This method is called from the implementation of
Request.read().- Specified by:
 readin interfaceHttpStream- Returns:
 - a chunk of content, possibly with non-null 
Content.Chunk.getFailure()ornull. 
 - 
demand
public void demand()Description copied from interface:HttpStreamDemands more content chunks to the underlying implementation.
This method is called from the implementation of
Request.demand(Runnable)and when the demand can be satisfied the implementation must callHttpChannel.onContentAvailable(). If there is a problem meeting demand, then the implementation must callHttpChannel.onFailure(Throwable).- Specified by:
 demandin interfaceHttpStream- See Also:
 
 - 
prepareResponse
Description copied from interface:HttpStreamPrepare the response headers with respect to the stream. Typically this may set headers related to protocol specific behaviour (e.g.
Keep-Alivefor HTTP/1.0 connections).- Specified by:
 prepareResponsein interfaceHttpStream- Parameters:
 headers- The headers to prepare.
 - 
send
public void send(MetaData.Request request, MetaData.Response response, boolean last, ByteBuffer content, Callback callback) Description copied from interface:HttpStreamSend response meta-data and/or data.
- Specified by:
 sendin interfaceHttpStream- Parameters:
 request- The request metadata for which the response should be sent.response- The response metadata to be sent or null if the response is already committed by a previous call to send.last- True if this will be the last call to send and the response can be completed.content- A buffer of content to send or null if no content.callback- The callback to invoke when the send is completed successfully or in failure.
 - 
cancelSend
Description copied from interface:HttpStreamCancel anyHttpStream.send(MetaData.Request, MetaData.Response, boolean, ByteBuffer, Callback)call in progress.- Specified by:
 cancelSendin interfaceHttpStream- Parameters:
 cause- The cause of the cancellationappCallback- The callback to ultimatelyfailafter the cancellation- Returns:
 - A 
Runnablethat will berunto complete the cancellation and will, in turn, ultimately fail both the passedCallbackand anyCallbackthat was passed to theHttpStream.send(MetaData.Request, MetaData.Response, boolean, ByteBuffer, Callback)method. 
 - 
push
Description copied from interface:HttpStreamPushes the given
resourceto the client.- Specified by:
 pushin interfaceHttpStream- Parameters:
 resource- the resource to push- See Also:
 
 - 
getIdleTimeout
public long getIdleTimeout()- Specified by:
 getIdleTimeoutin interfaceHttpStream
 - 
setIdleTimeout
public void setIdleTimeout(long idleTimeoutMs) - Specified by:
 setIdleTimeoutin interfaceHttpStream
 - 
isCommitted
public final boolean isCommitted()- Specified by:
 isCommittedin interfaceHttpStream
 - 
getTunnelSupport
- Specified by:
 getTunnelSupportin interfaceHttpStream
 - 
consumeAvailable
- Specified by:
 consumeAvailablein interfaceHttpStream
 - 
succeeded
 - 
failed
 - 
getInvocationType
- Specified by:
 getInvocationTypein interfaceHttpStream- Specified by:
 getInvocationTypein interfaceInvocable- Returns:
 - The InvocationType of this object
 
 
 -