public class ProtocolHandshake extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ABORT |
static int |
DIFFERENT_RESOURCE_VERSION |
static byte[] |
MAGIC_HEADER |
static int |
RESOURCE_OK |
| Constructor and Description |
|---|
ProtocolHandshake() |
| Modifier and Type | Method and Description |
|---|---|
static void |
initiateHandshake(InputStream in,
OutputStream out,
VersionNegotiator versionNegotiator)
Initiate handshake to ensure client and server can communicate with the same protocol.
|
private static void |
initiateVersionNegotiation(VersionNegotiator negotiator,
DataInputStream dis,
DataOutputStream dos) |
static void |
receiveHandshake(InputStream in,
OutputStream out,
VersionNegotiator versionNegotiator) |
private static void |
receiveVersionNegotiation(VersionNegotiator negotiator,
DataInputStream dis,
DataOutputStream dos) |
public static final byte[] MAGIC_HEADER
public static final int RESOURCE_OK
public static final int DIFFERENT_RESOURCE_VERSION
public static final int ABORT
public static void initiateHandshake(InputStream in, OutputStream out, VersionNegotiator versionNegotiator) throws IOException, HandshakeException
Initiate handshake to ensure client and server can communicate with the same protocol. If the server doesn't support requested protocol version, HandshakeException will be thrown.
DistributedMapCache version histories:
DistributedSetCache version histories:
IOExceptionHandshakeExceptionpublic static void receiveHandshake(InputStream in, OutputStream out, VersionNegotiator versionNegotiator) throws IOException, HandshakeException
IOExceptionHandshakeExceptionprivate static void initiateVersionNegotiation(VersionNegotiator negotiator, DataInputStream dis, DataOutputStream dos) throws IOException, HandshakeException
IOExceptionHandshakeExceptionprivate static void receiveVersionNegotiation(VersionNegotiator negotiator, DataInputStream dis, DataOutputStream dos) throws IOException, HandshakeException
IOExceptionHandshakeExceptionCopyright © 2022 Apache NiFi Project. All rights reserved.