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)
Callback method invoked when a GOAWAY frame has been received.
|
void |
onFailure(Session session,
Throwable failure)
Callback method invoked when a failure has been detected for this
session.
|
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 when the preface has been received.
|
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.
|
public Map<Integer,Integer> onPreface(Session session)
Session.ListenerCallback method invoked when the preface has been received.
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)
Session.ListenerCallback method invoked when a GOAWAY frame has been received.
onClose 在接口中 Session.Listenersession - the sessionframe - the GOAWAY frame receivedpublic boolean onIdleTimeout(Session session)
Session.ListenerCallback method invoked when the idle timeout expired.
onIdleTimeout 在接口中 Session.Listenersession - the sessionpublic void onFailure(Session session, Throwable failure)
Session.ListenerCallback method invoked when a failure has been detected for this session.
onFailure 在接口中 Session.Listenersession - the sessionfailure - the failureCopyright © 2016. All rights reserved.