Class CompletionStreamWrapper
java.lang.Object
org.eclipse.jetty.server.HttpStream.Wrapper
org.eclipse.jetty.server.internal.CompletionStreamWrapper
- All Implemented Interfaces:
HttpStream
,Callback
,Invocable
A HttpStream wrapper that keeps a list of listeners.
This is optimized for multiple completion event listeners being added, without other
stream wrappers interleaved.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Callback
Callback.Completable, Callback.Completing, Callback.Nested
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.HttpStream
HttpStream.Wrapper
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.Task
-
Field Summary
Fields inherited from interface org.eclipse.jetty.server.HttpStream
CONTENT_NOT_CONSUMED, UPGRADE_CONNECTION_ATTRIBUTE
Fields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddListener
(Consumer<Throwable> listener) void
Callback invoked when the operation fails.void
Callback invoked when the operation completes.Methods inherited from class org.eclipse.jetty.server.HttpStream.Wrapper
consumeAvailable, demand, getId, getIdleTimeout, getInvocationType, getTunnelSupport, getWrapped, isCommitted, prepareResponse, push, read, send, setIdleTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.Callback
completeWith
-
Constructor Details
-
CompletionStreamWrapper
-
-
Method Details
-
succeeded
public void succeeded()Description copied from interface:Callback
Callback invoked when the operation completes.
- Specified by:
succeeded
in interfaceCallback
- Overrides:
succeeded
in classHttpStream.Wrapper
- See Also:
-
failed
Description copied from interface:Callback
Callback invoked when the operation fails.
- Specified by:
failed
in interfaceCallback
- Overrides:
failed
in classHttpStream.Wrapper
- Parameters:
x
- the reason for the operation failure
-
addListener
-