public static class Session.Listener.Adapter extends Object implements Session.Listener
Empty implementation of Stream.Listener.
Session.Listener.Adapter| 构造器和说明 |
|---|
Adapter() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onClose(Session session,
GoAwayFrame frame) |
void |
onFailure(Session session,
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.
|
Map<Integer,Integer> |
onPreface(Session session)
Callback method invoked:
for clients, just before the preface is sent, to gather the
SETTINGS configuration options the client wants to send to the server;
for servers, just after having received the preface, to gather
the SETTINGS configuration options the server wants to send to the
client.
|
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, waitonClose, onFailurepublic Map<Integer,Integer> onPreface(Session session)
Session.ListenerCallback method invoked:
onPreface 在接口中 Session.Listenersession - the sessionpublic Stream.Listener onNewStream(Stream stream, HeadersFrame frame)
Session.ListenerCallback 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 在接口中 Session.Listenerstream - the newly created streamframe - the HEADERS frame receivedStream.Listener that will be notified of stream eventspublic void onSettings(Session session, SettingsFrame frame)
Session.ListenerCallback method invoked when a SETTINGS frame has been received.
onSettings 在接口中 Session.Listenersession - the sessionframe - the SETTINGS frame receivedpublic void onPing(Session session, PingFrame frame)
Session.ListenerCallback method invoked when a PING frame has been received.
onPing 在接口中 Session.Listenersession - the sessionframe - the PING frame receivedpublic void onReset(Session session, ResetFrame frame)
Session.ListenerCallback method invoked when a RST_STREAM frame has been received for an unknown stream.
onReset 在接口中 Session.Listenersession - the sessionframe - the RST_STREAM frame receivedStream.Listener.onReset(Stream, ResetFrame)public void onClose(Session session, GoAwayFrame frame)
onClose 在接口中 Session.Listenerpublic boolean onIdleTimeout(Session session)
Session.ListenerCallback method invoked when the idle timeout expired.
onIdleTimeout 在接口中 Session.Listenersession - the sessionpublic void onFailure(Session session, Throwable failure)
onFailure 在接口中 Session.ListenerCopyright © 2017. All rights reserved.