public abstract class Mechanism extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Mechanism.Status |
| Modifier and Type | Field and Description |
|---|---|
protected Options |
options |
protected SessionBase |
session |
protected String |
statusCode |
Metadata |
zapProperties |
Metadata |
zmtpProperties |
| Modifier | Constructor and Description |
|---|---|
protected |
Mechanism(SessionBase session,
Address peerAddress,
Options options) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProperty(ByteBuffer buf,
String name,
byte[] value) |
protected void |
addProperty(ByteBuffer buf,
String name,
String value) |
protected void |
addProperty(Msg msg,
String name,
byte[] value) |
protected void |
addProperty(Msg msg,
String name,
String value) |
protected boolean |
compare(ByteBuffer a1,
byte[] b,
int offset,
int length) |
protected boolean |
compare(Msg msg,
String data,
boolean includeLength) |
Msg |
decode(Msg msg) |
void |
destroy() |
Msg |
encode(Msg msg) |
Blob |
getUserId() |
abstract int |
nextHandshakeCommand(Msg msg) |
protected int |
parseMetadata(ByteBuffer msg,
int offset,
boolean zapFlag) |
protected int |
parseMetadata(Msg msg,
int offset,
boolean zapFlag) |
Msg |
peerIdentity() |
abstract int |
processHandshakeCommand(Msg msg) |
protected int |
property(String name,
byte[] value) |
protected int |
receiveAndProcessZapReply() |
protected void |
sendZapRequest(Mechanisms mechanism,
boolean more) |
protected String |
socketType(int socketType) |
abstract Mechanism.Status |
status() |
abstract int |
zapMsgAvailable() |
protected final Options options
public final Metadata zapProperties
public final Metadata zmtpProperties
protected final SessionBase session
protected String statusCode
protected Mechanism(SessionBase session, Address peerAddress, Options options)
public abstract Mechanism.Status status()
public final Msg peerIdentity()
public final Blob getUserId()
protected final void addProperty(ByteBuffer buf, String name, String value)
protected final void addProperty(ByteBuffer buf, String name, byte[] value)
protected final int parseMetadata(Msg msg, int offset, boolean zapFlag)
protected final int parseMetadata(ByteBuffer msg, int offset, boolean zapFlag)
protected int property(String name, byte[] value)
protected final String socketType(int socketType)
protected boolean compare(ByteBuffer a1, byte[] b, int offset, int length)
public abstract int zapMsgAvailable()
public abstract int processHandshakeCommand(Msg msg)
public abstract int nextHandshakeCommand(Msg msg)
protected final void sendZapRequest(Mechanisms mechanism, boolean more)
protected final int receiveAndProcessZapReply()
public void destroy()
Copyright © 2020. All rights reserved.