Package org.ldaptive.transport
Class DefaultSaslClient
- java.lang.Object
-
- org.ldaptive.transport.DefaultSaslClient
-
- All Implemented Interfaces:
SaslClient<DefaultSaslClientRequest>
public class DefaultSaslClient extends Object implements SaslClient<DefaultSaslClientRequest>
SASL client that negotiates the details of the bind operation.
-
-
Field Summary
Fields Modifier and Type Field Description private SaslClient
client
Underlying SASL client.private static Logger
LOGGER
Logger for this class.
-
Constructor Summary
Constructors Constructor Description DefaultSaslClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BindResponse
bind(TransportConnection conn, DefaultSaslClientRequest request)
Performs a SASL bind.void
dispose()
Disposes the underlying SASL client.SaslClient
getClient()
Returns the underlying SASL client.Mechanism
getMechanism()
Returns the SASL mechanism for this client.QualityOfProtection
getQualityOfProtection()
Returns the QOP for this client.
-
-
-
Field Detail
-
LOGGER
private static final Logger LOGGER
Logger for this class.
-
client
private SaslClient client
Underlying SASL client.
-
-
Method Detail
-
getClient
public SaslClient getClient()
Returns the underlying SASL client.- Returns:
- SASL client
-
bind
public BindResponse bind(TransportConnection conn, DefaultSaslClientRequest request) throws SaslException
Performs a SASL bind.- Specified by:
bind
in interfaceSaslClient<DefaultSaslClientRequest>
- Parameters:
conn
- to perform the bind onrequest
- SASL request to perform- Returns:
- final result of the bind process
- Throws:
SaslException
- if an error occurs
-
getMechanism
public Mechanism getMechanism()
Returns the SASL mechanism for this client. SeeSaslClient.getMechanismName()
.- Returns:
- SASL mechanism
-
getQualityOfProtection
public QualityOfProtection getQualityOfProtection()
Returns the QOP for this client. SeeSaslClient.getNegotiatedProperty(String)
.- Returns:
- QOP or null if the underlying sasl client has not completed
-
dispose
public void dispose()
Disposes the underlying SASL client. SeeSaslClient.dispose()
.
-
-