Class SaslMessageToken

java.lang.Object
org.apache.storm.messaging.netty.SaslMessageToken
All Implemented Interfaces:
INettySerializable

public class SaslMessageToken extends Object implements INettySerializable
Send and receive SASL tokens.
  • Field Details

  • 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

      public static SaslMessageToken read(byte[] serial)
    • 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 interface INettySerializable
    • 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 interface INettySerializable
      Parameters:
      dest - The ByteBuf to serialize to