private static class ProxyConnectionFactory.ProxyV2ConnectionFactory extends AbstractConnectionFactory implements ConnectionFactory.Detecting
Modifier and Type | Class and Description |
---|---|
private static class |
ProxyConnectionFactory.ProxyV2ConnectionFactory.Family |
private class |
ProxyConnectionFactory.ProxyV2ConnectionFactory.ProxyProtocolV2Connection |
private static class |
ProxyConnectionFactory.ProxyV2ConnectionFactory.Transport |
AbstractLifeCycle.AbstractLifeCycleListener
ConnectionFactory.Detecting.Detection
ConnectionFactory.Detecting, ConnectionFactory.Upgrading
Container.InheritedListener, Container.Listener
LifeCycle.Listener
Modifier and Type | Field and Description |
---|---|
private int |
_maxProxyHeader |
private java.lang.String |
_nextProtocol |
private static byte[] |
SIGNATURE |
Modifier | Constructor and Description |
---|---|
private |
ProxyV2ConnectionFactory(java.lang.String nextProtocol) |
Modifier and Type | Method and Description |
---|---|
ConnectionFactory.Detecting.Detection |
detect(java.nio.ByteBuffer buffer)
Check the bytes in the given
buffer to figure out if this ConnectionFactory.Detecting instance
can work with them or not. |
int |
getMaxProxyHeader() |
Connection |
newConnection(Connector connector,
EndPoint endp)
Creates a new
Connection with the given parameters |
void |
setMaxProxyHeader(int maxProxyHeader) |
configure, findNextProtocol, findNextProtocol, getFactories, getInputBufferSize, getProtocol, getProtocols, setInputBufferSize, toString
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProtocol, getProtocols
dumpContainer, dumpIterable, dumpMapEntries, dumpObjects, dumpSelf, named
private static final byte[] SIGNATURE
private final java.lang.String _nextProtocol
private int _maxProxyHeader
private ProxyV2ConnectionFactory(java.lang.String nextProtocol)
public ConnectionFactory.Detecting.Detection detect(java.nio.ByteBuffer buffer)
ConnectionFactory.Detecting
Check the bytes in the given buffer
to figure out if this ConnectionFactory.Detecting
instance
can work with them or not.
The buffer
MUST be left untouched by this method: bytes MUST NOT be consumed and MUST NOT be modified.
detect
in interface ConnectionFactory.Detecting
buffer
- the buffer.ConnectionFactory.Detecting.Detection.RECOGNIZED
if this ConnectionFactory.Detecting
instance can work with the bytes in the bufferConnectionFactory.Detecting.Detection.NOT_RECOGNIZED
if this ConnectionFactory.Detecting
instance cannot work with the bytes in the bufferConnectionFactory.Detecting.Detection.NEED_MORE_BYTES
if this ConnectionFactory.Detecting
instance requires more bytes to make a decisionpublic int getMaxProxyHeader()
public void setMaxProxyHeader(int maxProxyHeader)
public Connection newConnection(Connector connector, EndPoint endp)
ConnectionFactory
Creates a new Connection
with the given parameters
newConnection
in interface ConnectionFactory
connector
- The Connector
creating this connectionendp
- the EndPoint
associated with the connectionConnection