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
public static class Stream.Listener.Adapter extends java.lang.Object implements 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
Constructors Constructor Description Adapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onData(Stream stream, DataFrame frame, Callback callback)
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, java.lang.Throwable x)
Callback method invoked when the stream exceeds its idle timeout.Stream.Listener
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.void
onTimeout(Stream stream, java.lang.Throwable x)
Callback method invoked when the stream exceeds its idle timeout.-
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
onClosed, onFailure, onFailure, onNewStream, onReset
-
-
-
-
Method Detail
-
onHeaders
public void onHeaders(Stream stream, HeadersFrame frame)
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
public Stream.Listener onPush(Stream stream, PushPromiseFrame frame)
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 streamframe
- the PUSH_PROMISE frame received- Returns:
- a Stream.Listener that will be notified of pushed stream events
-
onData
public void onData(Stream stream, DataFrame frame, Callback callback)
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
-
onReset
public void onReset(Stream stream, ResetFrame frame)
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:
Session.Listener.onReset(Session, ResetFrame)
-
onTimeout
public void onTimeout(Stream stream, java.lang.Throwable x)
Description copied from interface:Stream.Listener
Callback method invoked when the stream exceeds its idle timeout.
- Specified by:
onTimeout
in interfaceStream.Listener
- Parameters:
stream
- the streamx
- the timeout failure- See Also:
Stream.getIdleTimeout()
-
onIdleTimeout
public boolean onIdleTimeout(Stream stream, java.lang.Throwable x)
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:
Stream.getIdleTimeout()
-
-