Package org.apache.qpid.protonj2.client
Class SaslOptions
- java.lang.Object
-
- org.apache.qpid.protonj2.client.SaslOptions
-
public class SaslOptions extends Object
Connection options that are applied to the SASL layer.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_SASL_ENABLED
The client default configuration value for SASL enabled state (default is true)
-
Constructor Summary
Constructors Constructor Description SaslOptions()
Create a newSaslOptions
instance configured with default configuration settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslOptions
addAllowedMechanism(String mechanism)
Adds a mechanism to the list of allowed SASL mechanisms this client will use when selecting from the remote peers offered set of SASL mechanisms.Set<String>
allowedMechanisms()
SaslOptions
clone()
SaslOptions
copyInto(SaslOptions other)
Copy all configuration into the givenSaslOptions
from this instance.boolean
saslEnabled()
SaslOptions
saslEnabled(boolean saslEnabled)
-
-
-
Field Detail
-
DEFAULT_SASL_ENABLED
public static final boolean DEFAULT_SASL_ENABLED
The client default configuration value for SASL enabled state (default is true)- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SaslOptions
public SaslOptions()
Create a newSaslOptions
instance configured with default configuration settings.
-
-
Method Detail
-
clone
public SaslOptions clone()
-
saslEnabled
public boolean saslEnabled()
- Returns:
- the saslLayer
-
saslEnabled
public SaslOptions saslEnabled(boolean saslEnabled)
- Parameters:
saslEnabled
- the saslLayer to set- Returns:
- this options instance.
-
addAllowedMechanism
public SaslOptions addAllowedMechanism(String mechanism)
Adds a mechanism to the list of allowed SASL mechanisms this client will use when selecting from the remote peers offered set of SASL mechanisms. If no allowed mechanisms are configured then the client will select the first mechanism from the server offered mechanisms that is supported.- Parameters:
mechanism
- The mechanism to allow.- Returns:
- this options object for chaining.
-
allowedMechanisms
public Set<String> allowedMechanisms()
- Returns:
- the current list of allowed SASL Mechanisms.
-
copyInto
public SaslOptions copyInto(SaslOptions other)
Copy all configuration into the givenSaslOptions
from this instance.- Parameters:
other
- anotherSaslOptions
instance that will receive the configuration from this instance.- Returns:
- the options instance that was copied into.
-
-