Top Inners Fields Constructors Methods
org.eclipse.jetty.http2.server

public Class RawHTTP2ServerConnectionFactory

extends AbstractHTTP2ServerConnectionFactory
Class Inheritance
Imports
java.util.Map, .Objects, org.eclipse.jetty.http2.api.Session, .Stream, org.eclipse.jetty.http2.api.server.ServerSessionListener, org.eclipse.jetty.http2.frames.GoAwayFrame, .HeadersFrame, .PingFrame, .ResetFrame, .SettingsFrame, org.eclipse.jetty.io.EndPoint, org.eclipse.jetty.server.Connector, .HttpConfiguration, org.eclipse.jetty.util.Callback

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final ServerSessionListener

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
protected ServerSessionListener
Inherited from org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory:
getFlowControlStrategyFactorygetHttpConfigurationgetInitialSessionRecvWindowgetInitialStreamRecvWindowgetMaxConcurrentStreamsgetMaxDecoderTableCapacitygetMaxEncoderTableCapacitygetMaxFrameSizegetMaxHeaderBlockFragmentgetMaxSettingsKeysgetRateControlFactorygetStreamIdleTimeoutisConnectProtocolEnabledisUseInputDirectByteBuffersisUseOutputDirectByteBuffersnewConnectionnewSettingssetConnectProtocolEnabledsetFlowControlStrategyFactorysetInitialSessionRecvWindowsetInitialStreamRecvWindowsetMaxConcurrentStreamssetMaxDecoderTableCapacitysetMaxEncoderTableCapacitysetMaxFrameSizesetMaxHeaderBlockFragmentsetMaxSettingsKeyssetRateControlFactorysetStreamIdleTimeoutsetUseInputDirectByteBufferssetUseOutputDirectByteBuffers

Field Detail

listenerback to summary
private final ServerSessionListener listener

Constructor Detail

RawHTTP2ServerConnectionFactoryback to summary
public RawHTTP2ServerConnectionFactory(ServerSessionListener listener)
RawHTTP2ServerConnectionFactoryback to summary
public RawHTTP2ServerConnectionFactory(HttpConfiguration httpConfiguration, ServerSessionListener listener)
RawHTTP2ServerConnectionFactoryback to summary
public RawHTTP2ServerConnectionFactory(HttpConfiguration httpConfiguration, ServerSessionListener listener, String... protocols)

Method Detail

newSessionListenerback to summary
protected ServerSessionListener newSessionListener(Connector connector, EndPoint endPoint)

Implements abstract org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory.newSessionListener.

Annotations
@Override
org.eclipse.jetty.http2.server back to summary

private Class RawHTTP2ServerConnectionFactory.RawServerSessionListener

extends Object
implements ServerSessionListener
Class Inheritance
  • java.lang.Object
  • org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory.RawServerSessionListener
All Implemented Interfaces
org.eclipse.jetty.http2.api.server.ServerSessionListener, org.eclipse.jetty.http2.api.Session.Listener

Field Summary

Modifier and TypeField and Description
private final ServerSessionListener

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
onAccept(Session
the session
session
)

Overrides default org.eclipse.jetty.http2.api.server.ServerSessionListener.onAccept.

Callback method invoked when a connection has been accepted by the server.

public void
onClose(Session
the session
session
,
GoAwayFrame
the GOAWAY frame that caused the session to be closed
frame
,
Callback
the callback to notify of the GOAWAY processing
callback
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onClose.

Callback method invoked when a GOAWAY frame caused the session to be closed.

public void
onFailure(Session
the session
session
,
Throwable
the failure
failure
,
Callback
the callback to notify of failure processing
callback
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onFailure.

Callback method invoked when a failure has been detected for this session.

public void
onGoAway(Session
the session
session
,
GoAwayFrame
the GOAWAY frame received
frame
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onGoAway.

Callback method invoked when a GOAWAY frame has been received.

public boolean
onIdleTimeout(Session
the session
session
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onIdleTimeout.

Callback method invoked when the idle timeout expired.

public Stream.Listener
onNewStream(Stream
the newly created stream
stream
,
HeadersFrame
the HEADERS frame received
frame
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onNewStream.

Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing an HTTP request.

public void
onPing(Session
the session
session
,
PingFrame
the PING frame received
frame
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onPing.

Callback method invoked when a PING frame has been received.

public Map<Integer, Integer>
onPreface(Session
the session
session
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onPreface.

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.
public void
onReset(Session
the session
session
,
ResetFrame
the RST_STREAM frame received
frame
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onReset.

Callback method invoked when a RST_STREAM frame has been received for an unknown stream.

public void
onSettings(Session
the session
session
,
SettingsFrame
the SETTINGS frame received
frame
)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onSettings.

Callback method invoked when a SETTINGS frame has been received.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final ServerSessionListener delegate

Constructor Detail

RawServerSessionListenerback to summary
private RawServerSessionListener(ServerSessionListener delegate)

Method Detail

onAcceptback to summary
public void onAccept(Session session)

Overrides default org.eclipse.jetty.http2.api.server.ServerSessionListener.onAccept.

Doc from org.eclipse.jetty.http2.api.server.ServerSessionListener.onAccept.

Callback method invoked when a connection has been accepted by the server.

Parameters
session:Session

the session

Annotations
@Override
onCloseback to summary
public void onClose(Session session, GoAwayFrame frame, Callback callback)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onClose.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onClose.

Callback method invoked when a GOAWAY frame caused the session to be closed.

Parameters
session:Session

the session

frame:GoAwayFrame

the GOAWAY frame that caused the session to be closed

callback:Callback

the callback to notify of the GOAWAY processing

Annotations
@Override
onFailureback to summary
public void onFailure(Session session, Throwable failure, Callback callback)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onFailure.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onFailure.

Callback method invoked when a failure has been detected for this session.

Parameters
session:Session

the session

failure:Throwable

the failure

callback:Callback

the callback to notify of failure processing

Annotations
@Override
onGoAwayback to summary
public void onGoAway(Session session, GoAwayFrame frame)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onGoAway.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onGoAway.

Callback method invoked when a GOAWAY frame has been received.

Parameters
session:Session

the session

frame:GoAwayFrame

the GOAWAY frame received

Annotations
@Override
onIdleTimeoutback to summary
public boolean onIdleTimeout(Session session)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onIdleTimeout.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onIdleTimeout.

Callback method invoked when the idle timeout expired.

Parameters
session:Session

the session

Returns:boolean

whether the session should be closed

Annotations
@Override
onNewStreamback to summary
public Stream.Listener onNewStream(Stream stream, HeadersFrame frame)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onNewStream.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onNewStream.

Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing an HTTP request.

Applications should implement this method to process HTTP requests, typically providing an 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 demand for DATA frames using Stream#demand() and then return either a Stream.Listener implementation that overrides Stream.Listener#onDataAvailable(Stream) where applications can read from the Stream via Stream#readData(), or Stream.Listener#AUTO_DISCARD that automatically reads and discards DATA frames. Returning null is possible but discouraged, and has the same effect of demanding and discarding the DATA frames.

Parameters
stream:Stream

the newly created stream

frame:HeadersFrame

the HEADERS frame received

Returns:Stream.Listener

a Stream.Listener that will be notified of stream events

Annotations
@Override
onPingback to summary
public void onPing(Session session, PingFrame frame)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onPing.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onPing.

Callback method invoked when a PING frame has been received.

Parameters
session:Session

the session

frame:PingFrame

the PING frame received

Annotations
@Override
onPrefaceback to summary
public Map<Integer, Integer> onPreface(Session session)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onPreface.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onPreface.

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.
Parameters
session:Session

the session

Returns:Map<Integer, Integer>

a (possibly empty or null) map containing SETTINGS configuration options to send.

Annotations
@Override
onResetback to summary
public void onReset(Session session, ResetFrame frame)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onReset.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onReset.

Callback method invoked when a RST_STREAM frame has been received for an unknown stream.

Parameters
session:Session

the session

frame:ResetFrame

the RST_STREAM frame received

Annotations
@Override
onSettingsback to summary
public void onSettings(Session session, SettingsFrame frame)

Overrides default org.eclipse.jetty.http2.api.Session.Listener.onSettings.

Doc from org.eclipse.jetty.http2.api.Session.Listener.onSettings.

Callback method invoked when a SETTINGS frame has been received.

Parameters
session:Session

the session

frame:SettingsFrame

the SETTINGS frame received

Annotations
@Override