final Principal externalPrincipal)
throws SaslException
{
if(PlainSaslServer.MECHANISM.equals(mechanism))
{
return new PlainAdapterSaslServer(this);
}
else if(CRAMMD5HashedSaslServer.MECHANISM.equals(mechanism))
{
//simply delegate to the built in CRAM-MD5 SaslServer
return new CRAMMD5HashedSaslServer(mechanism, "AMQP", localFQDN, null, new MD5Callbackhandler(false));