Class 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 of PlainSaslServer. The parameter mechanism must be "PLAIN" when this Factory is called, or null will be returned.
    • 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 a SaslServer using the parameters supplied.
      java.lang.String[] getMechanismNames​(java.util.Map<java.lang.String,​?> props)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 a 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.
        Specified by:
        createSaslServer in interface javax.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 performed
        serverName - the non-null fully qualified host name of the server to authenticate to
        props - the possibly null set of properties used to select the SASL mechanism and to configure the authentication exchange of the selected mechanism
        callbackHandler - 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 interface javax.security.sasl.SaslServerFactory