public abstract class Mechanism
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Mechanism.Status |
Modifier and Type | Field and Description |
---|---|
private Blob |
identity |
protected Options |
options |
private Address |
peerAddress |
protected SessionBase |
session |
protected java.lang.String |
statusCode |
private Blob |
userId |
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(java.nio.ByteBuffer buf,
java.lang.String name,
byte[] value) |
protected void |
addProperty(java.nio.ByteBuffer buf,
java.lang.String name,
java.lang.String value) |
protected void |
addProperty(Msg msg,
java.lang.String name,
byte[] value) |
protected void |
addProperty(Msg msg,
java.lang.String name,
java.lang.String value) |
protected boolean |
compare(java.nio.ByteBuffer a1,
byte[] b,
int offset,
int length) |
protected boolean |
compare(Msg msg,
java.lang.String data,
boolean includeLength) |
Msg |
decode(Msg msg) |
void |
destroy() |
Msg |
encode(Msg msg) |
Blob |
getUserId() |
protected int |
handleErrorReason(java.lang.String reason) |
abstract int |
nextHandshakeCommand(Msg msg) |
protected int |
parseErrorMessage(Msg msg) |
protected int |
parseMetadata(java.nio.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(java.lang.String name,
byte[] value) |
protected int |
receiveAndProcessZapReply() |
protected void |
sendZapRequest(Mechanisms mechanism,
boolean more) |
private void |
setPeerIdentity(byte[] data) |
private void |
setUserId(byte[] data) |
protected java.lang.String |
socketType() |
abstract Mechanism.Status |
status() |
abstract int |
zapMsgAvailable() |
protected final Options options
private Blob identity
private Blob userId
public final Metadata zapProperties
public final Metadata zmtpProperties
protected final SessionBase session
private final Address peerAddress
protected java.lang.String statusCode
protected Mechanism(SessionBase session, Address peerAddress, Options options)
public abstract Mechanism.Status status()
private void setPeerIdentity(byte[] data)
public final Msg peerIdentity()
private void setUserId(byte[] data)
public final Blob getUserId()
protected final void addProperty(java.nio.ByteBuffer buf, java.lang.String name, java.lang.String value)
protected final void addProperty(Msg msg, java.lang.String name, java.lang.String value)
protected final void addProperty(java.nio.ByteBuffer buf, java.lang.String name, byte[] value)
protected final void addProperty(Msg msg, java.lang.String name, byte[] value)
protected final int parseMetadata(Msg msg, int offset, boolean zapFlag)
protected final int parseMetadata(java.nio.ByteBuffer msg, int offset, boolean zapFlag)
protected int property(java.lang.String name, byte[] value)
protected final java.lang.String socketType()
protected boolean compare(Msg msg, java.lang.String data, boolean includeLength)
protected boolean compare(java.nio.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 int parseErrorMessage(Msg msg)
protected int handleErrorReason(java.lang.String reason)
protected final void sendZapRequest(Mechanisms mechanism, boolean more)
protected final int receiveAndProcessZapReply()
public void destroy()