Class SaslInitFrame

java.lang.Object
com.swiftmq.amqp.v100.transport.AMQPFrame
com.swiftmq.amqp.v100.generated.security.sasl.SaslInitFrame
All Implemented Interfaces:
SaslFrameIF, FrameIF, Writable

public class SaslInitFrame extends AMQPFrame implements SaslFrameIF

Selects the sasl mechanism and provides the initial response if needed.

Version:
AMQP Version v100. Generation Date: Wed Apr 18 14:09:32 CEST 2012
Author:
IIT Software GmbH, Bremen/Germany, (c) 2012, All Rights Reserved
  • Field Details

  • Constructor Details

    • SaslInitFrame

      public SaslInitFrame(int channel, AMQPList body) throws Exception
      Constructs a SaslInitFrame.
      Parameters:
      channel - the channel id
      body - the frame body
      Throws:
      Exception
    • SaslInitFrame

      public SaslInitFrame(int channel)
      Constructs a SaslInitFrame.
      Parameters:
      channel - the channel id
  • Method Details

    • accept

      public void accept(SaslFrameVisitor visitor)
      Accept method for a SaslFrame visitor.
      Specified by:
      accept in interface SaslFrameIF
      Overrides:
      accept in class AMQPFrame
      Parameters:
      visitor - SaslFrame visitor
    • getMechanism

      public AMQPSymbol getMechanism()
      Returns the mandatory Mechanism field.
      Returns:
      Mechanism
    • setMechanism

      public void setMechanism(AMQPSymbol mechanism)
      Sets the mandatory Mechanism field.

      The name of the SASL mechanism used for the SASL exchange. If the selected mechanism is not supported by the receiving peer, it MUST close the connection with the authentication-failure close-code. Each peer MUST authenticate using the highest-level security profile it can handle from the list provided by the partner.

      Parameters:
      mechanism - Mechanism
    • getInitialResponse

      public AMQPBinary getInitialResponse()
      Returns the optional InitialResponse field.
      Returns:
      InitialResponse
    • setInitialResponse

      public void setInitialResponse(AMQPBinary initialResponse)
      Sets the optional InitialResponse field.

      A block of opaque data passed to the security mechanism. The contents of this data are defined by the SASL security mechanism.

      Parameters:
      initialResponse - InitialResponse
    • getHostname

      public AMQPString getHostname()
      Returns the optional Hostname field.
      Returns:
      Hostname
    • setHostname

      public void setHostname(AMQPString hostname)
      Sets the optional Hostname field.

      The DNS name of the host (either fully qualified or relative) to which the sending peer is connecting. It is not mandatory to provide the hostname. If no hostname is provided the receiving peer should select a default based on its own configuration.

      This field can be used by AMQP proxies to determine the correct back-end service to connect the client to, and to determine the domain to validate the client's credentials against.

      This field may already have been specified by the server name indication extension as described in RFC-4366 [ RFC4366 ], if a TLS layer is used, in which case this field SHOULD either be null or contain the same value. It is undefined what a different value to those already specified means.

      Parameters:
      hostname - Hostname
    • getPredictedSize

      public int getPredictedSize()
      Returns the predicted size of this SaslInitFrame. The predicted size may be greater than the actual size but it can never be less.
      Specified by:
      getPredictedSize in interface FrameIF
      Specified by:
      getPredictedSize in interface SaslFrameIF
      Overrides:
      getPredictedSize in class AMQPFrame
      Returns:
      predicted size
    • writeBody

      protected void writeBody(DataOutput out) throws IOException
      Specified by:
      writeBody in class AMQPFrame
      Throws:
      IOException
    • getValueString

      public String getValueString()
      Returns a value representation of this SaslInitFrame.
      Specified by:
      getValueString in interface FrameIF
      Specified by:
      getValueString in interface SaslFrameIF
      Overrides:
      getValueString in class AMQPFrame
      Returns:
      value representation
    • toString

      public String toString()
      Overrides:
      toString in class AMQPFrame