Package org.eclipse.jetty.http2.api
Class Stream.Listener.Adapter
java.lang.Object
org.eclipse.jetty.http2.api.Stream.Listener.Adapter
- All Implemented Interfaces:
Stream.Listener
- Enclosing interface:
- Stream.Listener
Empty implementation of Stream.Listener
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.http2.api.Stream.Listener
Stream.Listener.Adapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Callback method invoked when a DATA frame has been received.void
onHeaders
(Stream stream, HeadersFrame frame) Callback method invoked when a HEADERS frame representing the HTTP response has been received.boolean
onIdleTimeout
(Stream stream, Throwable x) Callback method invoked when the stream exceeds its idle timeout.onPush
(Stream stream, PushPromiseFrame frame) Callback method invoked when a PUSH_PROMISE frame has been received.void
onReset
(Stream stream, ResetFrame frame) Callback method invoked when a RST_STREAM frame has been received for this stream.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.http2.api.Stream.Listener
onBeforeData, onClosed, onDataDemanded, onFailure, onNewStream, onReset
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
onHeaders
Description copied from interface:Stream.Listener
Callback method invoked when a HEADERS frame representing the HTTP response has been received.
- Specified by:
onHeaders
in interfaceStream.Listener
- Parameters:
stream
- the streamframe
- the HEADERS frame received
-
onPush
Description copied from interface:Stream.Listener
Callback method invoked when a PUSH_PROMISE frame has been received.
- Specified by:
onPush
in interfaceStream.Listener
- Parameters:
stream
- the pushed streamframe
- the PUSH_PROMISE frame received- Returns:
- a Stream.Listener that will be notified of pushed stream events
-
onData
Description copied from interface:Stream.Listener
Callback method invoked when a DATA frame has been received.
- Specified by:
onData
in interfaceStream.Listener
- Parameters:
stream
- the streamframe
- the DATA frame receivedcallback
- the callback to complete when the bytes of the DATA frame have been consumed- See Also:
-
onReset
Description copied from interface:Stream.Listener
Callback method invoked when a RST_STREAM frame has been received for this stream.
- Specified by:
onReset
in interfaceStream.Listener
- Parameters:
stream
- the streamframe
- the RST_FRAME received- See Also:
-
onIdleTimeout
Description copied from interface:Stream.Listener
Callback method invoked when the stream exceeds its idle timeout.
- Specified by:
onIdleTimeout
in interfaceStream.Listener
- Parameters:
stream
- the streamx
- the timeout failure- Returns:
- true to reset the stream, false to ignore the idle timeout
- See Also:
-