public static interface ConnectionFactory.Detecting extends ConnectionFactory
Connections created by this factory MUST implement Connection.UpgradeTo
.
Modifier and Type | Interface and Description |
---|---|
static class |
ConnectionFactory.Detecting.Detection
The possible outcomes of the
detect(ByteBuffer) method. |
ConnectionFactory.Detecting, ConnectionFactory.Upgrading
Modifier and Type | Method and Description |
---|---|
ConnectionFactory.Detecting.Detection |
detect(ByteBuffer buffer)
Check the bytes in the given
buffer to figure out if this ConnectionFactory.Detecting instance
can work with them or not. |
getProtocol, getProtocols, newConnection
ConnectionFactory.Detecting.Detection detect(ByteBuffer buffer)
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.
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 decisionCopyright © 2010 - 2020 Adobe. All Rights Reserved