Package zmq.io.mechanism
Class Mechanism
- java.lang.Object
-
- zmq.io.mechanism.Mechanism
-
- Direct Known Subclasses:
CurveClientMechanism
,CurveServerMechanism
,GssapiClientMechanism
,GssapiServerMechanism
,NullMechanism
,PlainClientMechanism
,PlainServerMechanism
public abstract class Mechanism extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Mechanism.Status
-
Field Summary
Fields Modifier and Type Field 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
-
Constructor Summary
Constructors Modifier Constructor Description protected
Mechanism(SessionBase session, Address peerAddress, Options options)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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()
abstract int
nextHandshakeCommand(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(int socketType)
abstract Mechanism.Status
status()
abstract int
zapMsgAvailable()
-
-
-
Field Detail
-
options
protected final Options options
-
identity
private Blob identity
-
userId
private Blob userId
-
zapProperties
public final Metadata zapProperties
-
zmtpProperties
public final Metadata zmtpProperties
-
session
protected final SessionBase session
-
peerAddress
private final Address peerAddress
-
statusCode
protected java.lang.String statusCode
-
-
Constructor Detail
-
Mechanism
protected Mechanism(SessionBase session, Address peerAddress, Options options)
-
-
Method Detail
-
status
public abstract Mechanism.Status status()
-
setPeerIdentity
private void setPeerIdentity(byte[] data)
-
peerIdentity
public final Msg peerIdentity()
-
setUserId
private void setUserId(byte[] data)
-
getUserId
public final Blob getUserId()
-
addProperty
protected final void addProperty(java.nio.ByteBuffer buf, java.lang.String name, java.lang.String value)
-
addProperty
protected final void addProperty(Msg msg, java.lang.String name, java.lang.String value)
-
addProperty
protected final void addProperty(java.nio.ByteBuffer buf, java.lang.String name, byte[] value)
-
addProperty
protected final void addProperty(Msg msg, java.lang.String name, byte[] value)
-
parseMetadata
protected final int parseMetadata(Msg msg, int offset, boolean zapFlag)
-
parseMetadata
protected final int parseMetadata(java.nio.ByteBuffer msg, int offset, boolean zapFlag)
-
property
protected int property(java.lang.String name, byte[] value)
-
socketType
protected final java.lang.String socketType(int socketType)
-
compare
protected boolean compare(Msg msg, java.lang.String data, boolean includeLength)
-
compare
protected boolean compare(java.nio.ByteBuffer a1, byte[] b, int offset, int length)
-
zapMsgAvailable
public abstract int zapMsgAvailable()
-
processHandshakeCommand
public abstract int processHandshakeCommand(Msg msg)
-
nextHandshakeCommand
public abstract int nextHandshakeCommand(Msg msg)
-
sendZapRequest
protected final void sendZapRequest(Mechanisms mechanism, boolean more)
-
receiveAndProcessZapReply
protected final int receiveAndProcessZapReply()
-
destroy
public void destroy()
-
-