Class 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
    • Constructor Detail

      • SaslInitFrame

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

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

      • 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
      • writeBody

        protected void writeBody​(java.io.DataOutput out)
                          throws java.io.IOException
        Specified by:
        writeBody in class AMQPFrame
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class AMQPFrame