Class Http2OpenListener
- java.lang.Object
-
- io.undertow.server.protocol.http2.Http2OpenListener
-
- All Implemented Interfaces:
DelegateOpenListener
,OpenListener
,EventListener
,org.xnio.ChannelListener<org.xnio.StreamConnection>
public final class Http2OpenListener extends Object implements org.xnio.ChannelListener<org.xnio.StreamConnection>, DelegateOpenListener
Open listener for HTTP2 server- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description Http2OpenListener(ByteBufferPool pool)
Http2OpenListener(ByteBufferPool pool, org.xnio.OptionMap undertowOptions)
Http2OpenListener(ByteBufferPool pool, org.xnio.OptionMap undertowOptions, String protocol)
Http2OpenListener(org.xnio.Pool<ByteBuffer> pool)
Deprecated.Http2OpenListener(org.xnio.Pool<ByteBuffer> pool, org.xnio.OptionMap undertowOptions)
Deprecated.Http2OpenListener(org.xnio.Pool<ByteBuffer> pool, org.xnio.OptionMap undertowOptions, String protocol)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeConnections()
Close all active connections that were handled by this listenerByteBufferPool
getBufferPool()
ConnectorStatistics
getConnectorStatistics()
HttpHandler
getRootHandler()
org.xnio.OptionMap
getUndertowOptions()
void
handleEvent(org.xnio.StreamConnection channel)
void
handleEvent(org.xnio.StreamConnection channel, PooledByteBuffer buffer)
void
setRootHandler(HttpHandler rootHandler)
Sets the root handlervoid
setUndertowOptions(org.xnio.OptionMap undertowOptions)
-
-
-
Field Detail
-
HTTP2
public static final String HTTP2
- See Also:
- Constant Field Values
-
HTTP2_14
@Deprecated public static final String HTTP2_14
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Http2OpenListener
@Deprecated public Http2OpenListener(org.xnio.Pool<ByteBuffer> pool)
Deprecated.
-
Http2OpenListener
@Deprecated public Http2OpenListener(org.xnio.Pool<ByteBuffer> pool, org.xnio.OptionMap undertowOptions)
Deprecated.
-
Http2OpenListener
@Deprecated public Http2OpenListener(org.xnio.Pool<ByteBuffer> pool, org.xnio.OptionMap undertowOptions, String protocol)
Deprecated.
-
Http2OpenListener
public Http2OpenListener(ByteBufferPool pool)
-
Http2OpenListener
public Http2OpenListener(ByteBufferPool pool, org.xnio.OptionMap undertowOptions)
-
Http2OpenListener
public Http2OpenListener(ByteBufferPool pool, org.xnio.OptionMap undertowOptions, String protocol)
-
-
Method Detail
-
handleEvent
public void handleEvent(org.xnio.StreamConnection channel, PooledByteBuffer buffer)
- Specified by:
handleEvent
in interfaceDelegateOpenListener
- Parameters:
channel
- The channelbuffer
- Any additional data that was read from the stream as part of the handshake process
-
getConnectorStatistics
public ConnectorStatistics getConnectorStatistics()
- Specified by:
getConnectorStatistics
in interfaceOpenListener
- Returns:
- The connector statistics, or null if statistics gathering is disabled.
-
closeConnections
public void closeConnections()
Description copied from interface:OpenListener
Close all active connections that were handled by this listener- Specified by:
closeConnections
in interfaceOpenListener
-
getRootHandler
public HttpHandler getRootHandler()
- Specified by:
getRootHandler
in interfaceOpenListener
- Returns:
- The first handler that will be executed by requests on the connector
-
setRootHandler
public void setRootHandler(HttpHandler rootHandler)
Description copied from interface:OpenListener
Sets the root handler- Specified by:
setRootHandler
in interfaceOpenListener
- Parameters:
rootHandler
- The new root handler
-
getUndertowOptions
public org.xnio.OptionMap getUndertowOptions()
- Specified by:
getUndertowOptions
in interfaceOpenListener
- Returns:
- The connector options
-
setUndertowOptions
public void setUndertowOptions(org.xnio.OptionMap undertowOptions)
- Specified by:
setUndertowOptions
in interfaceOpenListener
- Parameters:
undertowOptions
- The connector options
-
getBufferPool
public ByteBufferPool getBufferPool()
- Specified by:
getBufferPool
in interfaceOpenListener
- Returns:
- The buffer pool in use by this connector
-
handleEvent
public void handleEvent(org.xnio.StreamConnection channel)
- Specified by:
handleEvent
in interfaceorg.xnio.ChannelListener<org.xnio.StreamConnection>
-
-