Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.BrokerPlugin


        // Allow the concurrent local bridge connections to be made even though
        // they are duplicated; this prevents both of the bridge attempts from
        // failing in the case that the local and remote bridges are established
        // out-of-order.
        BrokerPlugin ignoreAddConnectionPlugin = new BrokerPlugin() {
            @Override
            public Broker installPlugin(Broker broker) throws Exception {
                return new BrokerFilter(broker) {
                    @Override
                    public void addConnection(ConnectionContext context,
View Full Code Here


                "broker:(vm://broker1)/broker1?persistent=false"));
        final BrokerService broker2 = createBroker(new URI(
                "broker:(vm://broker2)/broker2?persistent=false"));

        // Force bridge failure by having broker1 disallow connections.
        BrokerPlugin disallowAddConnectionPlugin = new BrokerPlugin() {
            @Override
            public Broker installPlugin(Broker broker) throws Exception {
                return new BrokerFilter(broker) {
                    @Override
                    public void addConnection(ConnectionContext context,
View Full Code Here

        // Setup destination
        final Destination dest = createDestination("TEST.FOO", false);

        // delay the advisory messages so that one can percolate fully (cyclicly) before the other
        BrokerItem brokerB = brokers.get("BrokerA");
        brokerB.broker.setPlugins(new BrokerPlugin[]{new BrokerPlugin() {

            public Broker installPlugin(Broker broker) throws Exception {         
                return new BrokerFilter(broker) {

                    final AtomicInteger count = new AtomicInteger();
View Full Code Here

    protected BrokerService createBroker() throws Exception {
        brokerService = new BrokerService();
        brokerService.setPersistent(false);

        ArrayList<BrokerPlugin> plugins = new ArrayList<BrokerPlugin>();
        BrokerPlugin authenticationPlugin = configureAuthentication();
        plugins.add(authenticationPlugin);
        BrokerPlugin[] array = new BrokerPlugin[plugins.size()];
        brokerService.setPlugins(plugins.toArray(array));

        transportConnector = brokerService.addConnector(LOCAL_URI);
View Full Code Here

        addStompConnector();
        addOpenWireConnector();

        cf = new ActiveMQConnectionFactory(jmsUri);

        BrokerPlugin authenticationPlugin = configureAuthentication();
        if (authenticationPlugin != null) {
            plugins.add(configureAuthorization());
        }

        BrokerPlugin authorizationPlugin = configureAuthorization();
        if (authorizationPlugin != null) {
            plugins.add(configureAuthentication());
        }

        if (!plugins.isEmpty()) {
View Full Code Here

        // Setup destination
        final Destination dest = createDestination("TEST.FOO", false);

        // delay the advisory messages so that one can percolate fully (cyclicly) before the other
        BrokerItem brokerB = brokers.get("BrokerA");
        brokerB.broker.setPlugins(new BrokerPlugin[]{new BrokerPlugin() {

            public Broker installPlugin(Broker broker) throws Exception {         
                return new BrokerFilter(broker) {

                    final AtomicInteger count = new AtomicInteger();
View Full Code Here

        addStompConnector();
        addOpenWireConnector();

        cf = new ActiveMQConnectionFactory(jmsUri);

        BrokerPlugin authenticationPlugin = configureAuthentication();
        if (authenticationPlugin != null) {
            plugins.add(configureAuthorization());
        }

        BrokerPlugin authorizationPlugin = configureAuthorization();
        if (authorizationPlugin != null) {
            plugins.add(configureAuthentication());
        }

        if (!plugins.isEmpty()) {
View Full Code Here

        // Allow the concurrent local bridge connections to be made even though
        // they are duplicated; this prevents both of the bridge attempts from
        // failing in the case that the local and remote bridges are established
        // out-of-order.
        BrokerPlugin ignoreAddConnectionPlugin = new BrokerPlugin() {
            @Override
            public Broker installPlugin(Broker broker) throws Exception {
                return new BrokerFilter(broker) {
                    @Override
                    public void addConnection(ConnectionContext context,
View Full Code Here

                "broker:(vm://broker1)/broker1?persistent=false"));
        final BrokerService broker2 = createBroker(new URI(
                "broker:(vm://broker2)/broker2?persistent=false"));

        // Force bridge failure by having broker1 disallow connections.
        BrokerPlugin disallowAddConnectionPlugin = new BrokerPlugin() {
            @Override
            public Broker installPlugin(Broker broker) throws Exception {
                return new BrokerFilter(broker) {
                    @Override
                    public void addConnection(ConnectionContext context,
View Full Code Here

        // Setup destination
        final Destination dest = createDestination("TEST.FOO", false);

        // delay the advisory messages so that one can percolate fully (cyclicly) before the other
        BrokerItem brokerB = brokers.get("BrokerA");
        brokerB.broker.setPlugins(new BrokerPlugin[]{new BrokerPlugin() {

            public Broker installPlugin(Broker broker) throws Exception {         
                return new BrokerFilter(broker) {

                    final AtomicInteger count = new AtomicInteger();
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.BrokerPlugin

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.