Package org.apache.activemq.security

Examples of org.apache.activemq.security.SimpleAuthorizationMap


        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
        broker.setPersistent(false);
        broker.setBrokerName(getName());

        AuthorizationPlugin plugin = new AuthorizationPlugin();
        plugin.setMap(new SimpleAuthorizationMap());
        BrokerPlugin[] plugins = new BrokerPlugin[] {plugin};
        broker.setPlugins(plugins);

        broker.start();
    }
View Full Code Here


        final String ANONYMOUS = "anonymous";
        authenticationPlugin.setAnonymousGroup(ANONYMOUS);
        final DefaultAuthorizationMap map = new DefaultAuthorizationMap();
        // only one authorized destination, anonymous for anonymous group!
        map.put(new ActiveMQTopic(ANONYMOUS), new GroupPrincipal(ANONYMOUS));
        final AuthorizationPlugin authorizationPlugin = new AuthorizationPlugin(new SimpleAuthorizationMap(map, map, map));

        brokerService.setPlugins(new BrokerPlugin[] { authorizationPlugin, authenticationPlugin });
        brokerService.start();

        MQTT mqtt = createMQTTConnection();
View Full Code Here

TOP

Related Classes of org.apache.activemq.security.SimpleAuthorizationMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.