private class RawHTTP2ServerConnectionFactory.RawServerSessionListener extends java.lang.Object implements ServerSessionListener
ServerSessionListener.Adapter
Modifier and Type | Field and Description |
---|---|
private ServerSessionListener |
delegate |
Modifier | Constructor and Description |
---|---|
private |
RawServerSessionListener(ServerSessionListener delegate) |
Modifier and Type | Method and Description |
---|---|
void |
onAccept(Session session)
Callback method invoked when a connection has been accepted by the server.
|
void |
onClose(Session session,
GoAwayFrame frame) |
void |
onFailure(Session session,
java.lang.Throwable failure) |
boolean |
onIdleTimeout(Session session)
Callback method invoked when the idle timeout expired.
|
Stream.Listener |
onNewStream(Stream stream,
HeadersFrame frame)
Callback method invoked when a new stream is being created upon
receiving a HEADERS frame representing a HTTP request.
|
void |
onPing(Session session,
PingFrame frame)
Callback method invoked when a PING frame has been received.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
onPreface(Session session)
Callback method invoked:
|
void |
onReset(Session session,
ResetFrame frame)
Callback method invoked when a RST_STREAM frame has been received for an unknown stream.
|
void |
onSettings(Session session,
SettingsFrame frame)
Callback method invoked when a SETTINGS frame has been received.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onClose, onFailure
private final ServerSessionListener delegate
private RawServerSessionListener(ServerSessionListener delegate)
public void onAccept(Session session)
ServerSessionListener
Callback method invoked when a connection has been accepted by the server.
onAccept
in interface ServerSessionListener
session
- the sessionpublic java.util.Map<java.lang.Integer,java.lang.Integer> onPreface(Session session)
Session.Listener
Callback method invoked:
onPreface
in interface Session.Listener
session
- the sessionpublic Stream.Listener onNewStream(Stream stream, HeadersFrame frame)
Session.Listener
Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing a HTTP request.
Applications should implement this method to process HTTP requests,
typically providing a HTTP response via
Stream.headers(HeadersFrame, Callback)
.
Applications can detect whether request DATA frames will be arriving
by testing HeadersFrame.isEndStream()
. If the application is
interested in processing the DATA frames, it must return a
Stream.Listener
implementation that overrides
Stream.Listener.onData(Stream, DataFrame, Callback)
.
onNewStream
in interface Session.Listener
stream
- the newly created streamframe
- the HEADERS frame receivedStream.Listener
that will be notified of stream eventspublic void onSettings(Session session, SettingsFrame frame)
Session.Listener
Callback method invoked when a SETTINGS frame has been received.
onSettings
in interface Session.Listener
session
- the sessionframe
- the SETTINGS frame receivedpublic void onPing(Session session, PingFrame frame)
Session.Listener
Callback method invoked when a PING frame has been received.
onPing
in interface Session.Listener
session
- the sessionframe
- the PING frame receivedpublic void onReset(Session session, ResetFrame frame)
Session.Listener
Callback method invoked when a RST_STREAM frame has been received for an unknown stream.
onReset
in interface Session.Listener
session
- the sessionframe
- the RST_STREAM frame receivedStream.Listener.onReset(Stream, ResetFrame)
public void onClose(Session session, GoAwayFrame frame)
onClose
in interface Session.Listener
public boolean onIdleTimeout(Session session)
Session.Listener
Callback method invoked when the idle timeout expired.
onIdleTimeout
in interface Session.Listener
session
- the sessionpublic void onFailure(Session session, java.lang.Throwable failure)
onFailure
in interface Session.Listener