Package io.undertow.server.protocol.http
Class JDK8HackAlpnOpenListener
- java.lang.Object
-
- io.undertow.server.protocol.http.JDK8HackAlpnOpenListener
-
- All Implemented Interfaces:
OpenListener,EventListener,org.xnio.ChannelListener<org.xnio.StreamConnection>
public class JDK8HackAlpnOpenListener extends Object implements org.xnio.ChannelListener<org.xnio.StreamConnection>
Open listener adaptor for ALPN connections that uses the SSLExplorer based approach and hack into the JDK8 SSLEngine via reflection.- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static booleanENABLED
-
Constructor Summary
Constructors Constructor Description JDK8HackAlpnOpenListener(ByteBufferPool bufferPool, org.xnio.OptionMap undertowOptions, String fallbackProtocol, DelegateOpenListener fallbackListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProtocol(String name, DelegateOpenListener listener, int weight)ByteBufferPoolgetBufferPool()ConnectorStatisticsgetConnectorStatistics()HttpHandlergetRootHandler()org.xnio.OptionMapgetUndertowOptions()voidhandleEvent(org.xnio.StreamConnection channel)voidsetRootHandler(HttpHandler rootHandler)Sets the root handlervoidsetUndertowOptions(org.xnio.OptionMap undertowOptions)
-
-
-
Constructor Detail
-
JDK8HackAlpnOpenListener
public JDK8HackAlpnOpenListener(ByteBufferPool bufferPool, org.xnio.OptionMap undertowOptions, String fallbackProtocol, DelegateOpenListener fallbackListener)
-
-
Method Detail
-
getRootHandler
public HttpHandler getRootHandler()
- Specified by:
getRootHandlerin interfaceOpenListener- Returns:
- The first handler that will be executed by requests on the connector
-
setRootHandler
public void setRootHandler(HttpHandler rootHandler)
Description copied from interface:OpenListenerSets the root handler- Specified by:
setRootHandlerin interfaceOpenListener- Parameters:
rootHandler- The new root handler
-
getUndertowOptions
public org.xnio.OptionMap getUndertowOptions()
- Specified by:
getUndertowOptionsin interfaceOpenListener- Returns:
- The connector options
-
setUndertowOptions
public void setUndertowOptions(org.xnio.OptionMap undertowOptions)
- Specified by:
setUndertowOptionsin interfaceOpenListener- Parameters:
undertowOptions- The connector options
-
getBufferPool
public ByteBufferPool getBufferPool()
- Specified by:
getBufferPoolin interfaceOpenListener- Returns:
- The buffer pool in use by this connector
-
getConnectorStatistics
public ConnectorStatistics getConnectorStatistics()
- Specified by:
getConnectorStatisticsin interfaceOpenListener- Returns:
- The connector statistics, or null if statistics gathering is disabled.
-
addProtocol
public void addProtocol(String name, DelegateOpenListener listener, int weight)
-
handleEvent
public void handleEvent(org.xnio.StreamConnection channel)
- Specified by:
handleEventin interfaceorg.xnio.ChannelListener<org.xnio.StreamConnection>
-
-