Class HttpClientTransportOverHTTP2.SessionListenerPromise
- java.lang.Object
-
- org.eclipse.jetty.http2.api.Session.Listener.Adapter
-
- org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2.SessionListenerPromise
-
- All Implemented Interfaces:
Session.Listener
,org.eclipse.jetty.util.Promise<Session>
- Enclosing class:
- HttpClientTransportOverHTTP2
private class HttpClientTransportOverHTTP2.SessionListenerPromise extends Session.Listener.Adapter implements org.eclipse.jetty.util.Promise<Session>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Promise
org.eclipse.jetty.util.Promise.Adapter<U extends java.lang.Object>, org.eclipse.jetty.util.Promise.Completable<S extends java.lang.Object>, org.eclipse.jetty.util.Promise.Wrapper<W extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.http2.api.Session.Listener
Session.Listener.Adapter
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicMarkableReference<HttpConnectionOverHTTP2>
connection
private java.util.Map<java.lang.String,java.lang.Object>
context
-
Constructor Summary
Constructors Modifier Constructor Description private
SessionListenerPromise(java.util.Map<java.lang.String,java.lang.Object> context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.eclipse.jetty.util.Promise<org.eclipse.jetty.client.api.Connection>
connectionPromise()
private HttpDestinationOverHTTP2
destination()
private boolean
failConnectionPromise(java.lang.Throwable failure)
void
failed(java.lang.Throwable failure)
private HttpConnectionOverHTTP2
getConnection()
void
onClose(Session session, GoAwayFrame frame)
void
onFailure(Session session, java.lang.Throwable failure)
void
onGoAway(Session session, GoAwayFrame frame)
Callback method invoked when a GOAWAY frame has been received.boolean
onIdleTimeout(Session session)
Callback method invoked when the idle timeout expired.private void
onServerPreface(Session session)
void
onSettings(Session session, SettingsFrame frame)
Callback method invoked when a SETTINGS frame has been received.void
succeeded(Session session)
-
Methods inherited from class org.eclipse.jetty.http2.api.Session.Listener.Adapter
onNewStream, onPing, onPreface, onReset
-
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.Session.Listener
onClose, onFailure
-
-
-
-
Field Detail
-
connection
private final java.util.concurrent.atomic.AtomicMarkableReference<HttpConnectionOverHTTP2> connection
-
context
private final java.util.Map<java.lang.String,java.lang.Object> context
-
-
Method Detail
-
succeeded
public void succeeded(Session session)
- Specified by:
succeeded
in interfaceorg.eclipse.jetty.util.Promise<Session>
-
failed
public void failed(java.lang.Throwable failure)
- Specified by:
failed
in interfaceorg.eclipse.jetty.util.Promise<Session>
-
destination
private HttpDestinationOverHTTP2 destination()
-
connectionPromise
private org.eclipse.jetty.util.Promise<org.eclipse.jetty.client.api.Connection> connectionPromise()
-
onSettings
public void onSettings(Session session, SettingsFrame frame)
Description copied from interface:Session.Listener
Callback method invoked when a SETTINGS frame has been received.
- Specified by:
onSettings
in interfaceSession.Listener
- Overrides:
onSettings
in classSession.Listener.Adapter
- Parameters:
session
- the sessionframe
- the SETTINGS frame received
-
onServerPreface
private void onServerPreface(Session session)
-
onGoAway
public void onGoAway(Session session, GoAwayFrame frame)
Description copied from interface:Session.Listener
Callback method invoked when a GOAWAY frame has been received.
- Specified by:
onGoAway
in interfaceSession.Listener
- Parameters:
session
- the sessionframe
- the GOAWAY frame received
-
onClose
public void onClose(Session session, GoAwayFrame frame)
- Specified by:
onClose
in interfaceSession.Listener
- Overrides:
onClose
in classSession.Listener.Adapter
-
onIdleTimeout
public boolean onIdleTimeout(Session session)
Description copied from interface:Session.Listener
Callback method invoked when the idle timeout expired.
- Specified by:
onIdleTimeout
in interfaceSession.Listener
- Overrides:
onIdleTimeout
in classSession.Listener.Adapter
- Parameters:
session
- the session- Returns:
- whether the session should be closed
-
onFailure
public void onFailure(Session session, java.lang.Throwable failure)
- Specified by:
onFailure
in interfaceSession.Listener
- Overrides:
onFailure
in classSession.Listener.Adapter
-
failConnectionPromise
private boolean failConnectionPromise(java.lang.Throwable failure)
-
getConnection
private HttpConnectionOverHTTP2 getConnection()
-
-