Interface ConnectionFactory.Detecting
- All Superinterfaces:
 ConnectionFactory
- All Known Implementing Classes:
 DetectorConnectionFactory, OptionalSslConnectionFactory, ProxyConnectionFactory, SslConnectionFactory
- Enclosing interface:
 ConnectionFactory
Connections created by this factory MUST implement Connection.UpgradeTo.
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe possible outcomes of thedetect(ByteBuffer)method.Nested classes/interfaces inherited from interface ConnectionFactory
ConnectionFactory.Configuring, ConnectionFactory.Detecting, ConnectionFactory.Upgrading - 
Method Summary
Modifier and TypeMethodDescriptiondetect(ByteBuffer buffer) Check the bytes in the givenbufferto figure out if thisConnectionFactory.Detectinginstance can work with them or not.Methods inherited from interface ConnectionFactory
getProtocol, getProtocols, newConnection 
- 
Method Details
- 
detect
Check the bytes in the given
bufferto figure out if thisConnectionFactory.Detectinginstance can work with them or not.The
bufferMUST be left untouched by this method: bytes MUST NOT be consumed and MUST NOT be modified.- Parameters:
 buffer- the buffer.- Returns:
 - One of:
ConnectionFactory.Detecting.Detection.RECOGNIZEDif thisConnectionFactory.Detectinginstance can work with the bytes in the bufferConnectionFactory.Detecting.Detection.NOT_RECOGNIZEDif thisConnectionFactory.Detectinginstance cannot work with the bytes in the bufferConnectionFactory.Detecting.Detection.NEED_MORE_BYTESif thisConnectionFactory.Detectinginstance requires more bytes to make a decision
 
 
 -