public class ProtocolChooser extends Object
This class is stateful, one instance is expected per channel.
| Modifier and Type | Field and Description |
|---|---|
static int |
BOLT_MAGIC_PREAMBLE |
| Constructor and Description |
|---|
ProtocolChooser(Map<Long,BiFunction<io.netty.channel.Channel,Boolean,BoltProtocol>> availableVersions,
boolean encryptionRequired,
boolean isEncrypted) |
| Modifier and Type | Method and Description |
|---|---|
BoltProtocol |
chosenProtocol() |
HandshakeOutcome |
handleVersionHandshakeChunk(io.netty.buffer.ByteBuf buffer,
io.netty.channel.Channel ch) |
public static final int BOLT_MAGIC_PREAMBLE
public ProtocolChooser(Map<Long,BiFunction<io.netty.channel.Channel,Boolean,BoltProtocol>> availableVersions, boolean encryptionRequired, boolean isEncrypted)
availableVersions - version -> protocol mappingencryptionRequired - whether or not the server allows only encrypted connectionsisEncrypted - whether of not this connection is encryptedpublic HandshakeOutcome handleVersionHandshakeChunk(io.netty.buffer.ByteBuf buffer, io.netty.channel.Channel ch)
public BoltProtocol chosenProtocol()
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.