Example usage for com.rabbitmq.client.impl ExternalMechanism ExternalMechanism

List of usage examples for com.rabbitmq.client.impl ExternalMechanism ExternalMechanism

Introduction

In this page you can find the example usage for com.rabbitmq.client.impl ExternalMechanism ExternalMechanism.

Prototype

ExternalMechanism

Source Link

Usage

From source file:org.geoserver.notification.common.CustomSaslConfig.java

License:Open Source License

@Override
public SaslMechanism getSaslMechanism(String[] serverMechanisms) {
    Set<String> server = new HashSet<String>(Arrays.asList(serverMechanisms));
    for (String m : mechanisms) {
        if (server.contains(m)) {
            if (m.equals("PLAIN")) {
                return new PlainMechanism();
            } else if (m.equals("EXTERNAL")) {
                return new ExternalMechanism();
            } else if (m.equals("ANONYMOUS")) {
                return new AnonymousMechanism();
            }/*www . j  a v  a 2s.  c  om*/
        }
    }

    return null;
}