Package org.apache.storm.messaging.netty
Class SaslMessageToken
java.lang.Object
org.apache.storm.messaging.netty.SaslMessageToken
- All Implemented Interfaces:
INettySerializable
Send and receive SASL tokens.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructor used for reflection only.SaslMessageToken
(byte[] token) Constructor used to send request. -
Method Summary
Modifier and TypeMethodDescriptionint
byte[]
Read accessor for SASL token.static SaslMessageToken
read
(byte[] serial) void
setSaslToken
(byte[] token) Write accessor for SASL token.void
write
(org.apache.storm.shade.io.netty.buffer.ByteBuf dest) encode the current SaslToken Message into a ByteBuf.
-
Field Details
-
IDENTIFIER
public static final short IDENTIFIER- See Also:
-
-
Constructor Details
-
SaslMessageToken
public SaslMessageToken()Constructor used for reflection only. -
SaslMessageToken
public SaslMessageToken(byte[] token) Constructor used to send request.- Parameters:
token
- the SASL token, generated by a SaslClient or SaslServer.
-
-
Method Details
-
read
-
getSaslToken
public byte[] getSaslToken()Read accessor for SASL token.- Returns:
- saslToken SASL token
-
setSaslToken
public void setSaslToken(byte[] token) Write accessor for SASL token.- Parameters:
token
- SASL token
-
encodeLength
public int encodeLength()- Specified by:
encodeLength
in interfaceINettySerializable
-
write
public void write(org.apache.storm.shade.io.netty.buffer.ByteBuf dest) encode the current SaslToken Message into a ByteBuf.SaslTokenMessageRequest is encoded as: identifier .... short(2) payload length .... int payload .... byte[]
- Specified by:
write
in interfaceINettySerializable
- Parameters:
dest
- The ByteBuf to serialize to
-