@ThreadSafe public static class PlainSaslServer.Factory extends Object implements SaslServerFactory
PlainSaslServer
. The parameter mechanism
must be "PLAIN" when this Factory is called, or null will be returned.Constructor and Description |
---|
Factory()
Constructs a new
PlainSaslServer.Factory for the PlainSaslServer . |
Modifier and Type | Method and Description |
---|---|
SaslServer |
createSaslServer(String mechanism,
String protocol,
String serverName,
Map<String,?> props,
CallbackHandler callbackHandler)
Creates a
SaslServer using the parameters supplied. |
String[] |
getMechanismNames(Map<String,?> props) |
public Factory()
PlainSaslServer.Factory
for the PlainSaslServer
.public SaslServer createSaslServer(String mechanism, String protocol, String serverName, Map<String,?> props, CallbackHandler callbackHandler) throws SaslException
SaslServer
using the parameters supplied. It returns null if no SaslServer
can be created using the parameters supplied. Throws SaslException
if it cannot
create a SaslServer because of an error.createSaslServer
in interface SaslServerFactory
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 operationSaslException
- If it cannot create a SaslServer because of an error.public String[] getMechanismNames(Map<String,?> props)
getMechanismNames
in interface SaslServerFactory
Copyright © 2023. All Rights Reserved.