public SaslServer createSaslServer(String mech,String protocol,String serverName,Map<String,?> props,CallbackHandler cbh) throws SaslException {
  if (mech.equals(myMechs[DIGEST_MD5]) && PolicyUtils.checkPolicy(mechPolicies[DIGEST_MD5],props)) {
    if (cbh == null) {
      throw new SaslException("Callback handler with support for AuthorizeCallback, " + "RealmCallback, NameCallback, and PasswordCallback " + "required");
    }
    return new DigestMD5Server(protocol,serverName,props,cbh);
  }
  return null;
}

public SaslServer createSaslServer ( String mech , String protocol , String serverName , Map < String , ? > props , CallbackHandler cbh ) throws SaslException { if ( mech . equals ( myMechs [ DIGEST_MD5 ] ) && PolicyUtils . checkPolicy ( mechPolicies [ DIGEST_MD5 ] , props ) ) { if ( cbh == null ) { throw new SaslException ( "Callback handler with support for AuthorizeCallback, " + "RealmCallback, NameCallback, and PasswordCallback " + "required" ) ; } return new DigestMD5Server ( protocol , serverName , props , cbh ) ; } return null ; }
returns a new instance of the digest - md5 sasl server mechanism .
