Class AbstractSaslMechanism

java.lang.Object
org.apache.activemq.transport.amqp.sasl.AbstractSaslMechanism
All Implemented Interfaces:
SaslMechanism
Direct Known Subclasses:
AnonymousMechanism, PlainMechanism

public abstract class AbstractSaslMechanism extends Object implements SaslMechanism
Base class for SASL Mechanisms that provides common functionality.
  • Field Details

    • username

      protected String username
    • password

      protected String password
    • failed

      protected boolean failed
    • failureReason

      protected String failureReason
  • Constructor Details

    • AbstractSaslMechanism

      public AbstractSaslMechanism()
  • Method Details

    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface SaslMechanism
      Returns:
      the User Name extracted from the SASL echange or null if none.
    • getPassword

      public String getPassword()
      Specified by:
      getPassword in interface SaslMechanism
      Returns:
      the Password extracted from the SASL echange or null if none.
    • isFailed

      public boolean isFailed()
      Specified by:
      isFailed in interface SaslMechanism
      Returns:
      true if the SASL processing failed during a step.
    • getFailureReason

      public String getFailureReason()
      Specified by:
      getFailureReason in interface SaslMechanism
      Returns:
      a failure error to explain why the mechanism failed.