public class ProtocolHandlerFactory extends Object
Constructor and Description |
---|
ProtocolHandlerFactory(LogConfig config)
Constructs the protocol handler factory.
|
Modifier and Type | Method and Description |
---|---|
ProtocolHandler |
getHandler(ByteBuffer buffer,
int count)
Looks at the buffer and determines the protocol.
|
public ProtocolHandlerFactory(LogConfig config)
config
- The log configurationpublic ProtocolHandler getHandler(ByteBuffer buffer, int count) throws UnsupportedProtocolException
buffer
- The buffercount
- The significant size of the buffer to analyzeUnsupportedProtocolException
- If the protocol cannot be
determined