Class PlainSaslServer.Factory
- java.lang.Object
-
- alluxio.security.authentication.plain.PlainSaslServer.Factory
-
- All Implemented Interfaces:
javax.security.sasl.SaslServerFactory
- Enclosing class:
- PlainSaslServer
@ThreadSafe public static class PlainSaslServer.Factory extends java.lang.Object implements javax.security.sasl.SaslServerFactory
This class is used to create an instances ofPlainSaslServer
. The parameter mechanism must be "PLAIN" when this Factory is called, or null will be returned.
-
-
Constructor Summary
Constructors Constructor Description Factory()
Constructs a newPlainSaslServer.Factory
for thePlainSaslServer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.security.sasl.SaslServer
createSaslServer(java.lang.String mechanism, java.lang.String protocol, java.lang.String serverName, java.util.Map<java.lang.String,?> props, javax.security.auth.callback.CallbackHandler callbackHandler)
Creates aSaslServer
using the parameters supplied.java.lang.String[]
getMechanismNames(java.util.Map<java.lang.String,?> props)
-
-
-
Constructor Detail
-
Factory
public Factory()
Constructs a newPlainSaslServer.Factory
for thePlainSaslServer
.
-
-
Method Detail
-
createSaslServer
public javax.security.sasl.SaslServer createSaslServer(java.lang.String mechanism, java.lang.String protocol, java.lang.String serverName, java.util.Map<java.lang.String,?> props, javax.security.auth.callback.CallbackHandler callbackHandler) throws javax.security.sasl.SaslException
Creates aSaslServer
using the parameters supplied. It returns null if no SaslServer can be created using the parameters supplied. ThrowsSaslException
if it cannot create a SaslServer because of an error.- Specified by:
createSaslServer
in interfacejavax.security.sasl.SaslServerFactory
- Parameters:
mechanism
- the name of a SASL mechanism. (e.g. "PLAIN")protocol
- the non-null string name of the protocol for which the authentication is being performedserverName
- the non-null fully qualified host name of the server to authenticate toprops
- the possibly null set of properties used to select the SASL mechanism and to configure the authentication exchange of the selected mechanismcallbackHandler
- the possibly null callback handler to used by the SASL mechanisms to do further operation- Returns:
- A possibly null SaslServer created using the parameters supplied. If null, this factory cannot produce a SaslServer using the parameters supplied.
- Throws:
javax.security.sasl.SaslException
- If it cannot create a SaslServer because of an error.
-
getMechanismNames
public java.lang.String[] getMechanismNames(java.util.Map<java.lang.String,?> props)
- Specified by:
getMechanismNames
in interfacejavax.security.sasl.SaslServerFactory
-
-