Examples of NetworkConnector


Examples of org.apache.activemq.network.NetworkConnector

        return advisoryTopicsForTempQueues;
    }


    private void bridgeAndConfigureBrokers(String local, String remote) throws Exception {
        NetworkConnector bridge = bridgeBrokers(local, remote);
    }
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

    public NetworkConnector addNetworkConnector(URI discoveryAddress) throws Exception {
        if (!isAdvisorySupport()) {
            throw new javax.jms.IllegalStateException(
                    "Networks require advisory messages to function - advisories are currently disabled");
        }
        NetworkConnector connector = new DiscoveryNetworkConnector(discoveryAddress);
        return addNetworkConnector(connector);
    }
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

     * @org.apache.xbean.Property
     *                            nestedType="org.apache.activemq.network.NetworkConnector"
     */
    public void setNetworkConnectors(List networkConnectors) throws Exception {
        for (Iterator iter = networkConnectors.iterator(); iter.hasNext();) {
            NetworkConnector connector = (NetworkConnector) iter.next();
            addNetworkConnector(connector);
        }
    }
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

        }
    }

    protected void stopAllConnectors(ServiceStopper stopper) {
        for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
            NetworkConnector connector = iter.next();
            unregisterNetworkConnectorMBean(connector);
            stopper.stop(connector);
        }
        for (Iterator<ProxyConnector> iter = getProxyConnectors().iterator(); iter.hasNext();) {
            ProxyConnector connector = iter.next();
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

            if (isWaitForSlave()) {
                waitForSlave();
            }
            if (!stopped.get()) {
                for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
                    NetworkConnector connector = iter.next();
                    connector.setLocalUri(uri);
                    connector.setBrokerName(getBrokerName());
                    connector.setDurableDestinations(durableDestinations);
                    if (getDefaultSocketURI() != null) {
                        connector.setBrokerURL(getDefaultSocketURI().toString());
                    }
                    connector.start();
                }
                for (Iterator<ProxyConnector> iter = getProxyConnectors().iterator(); iter.hasNext();) {
                    ProxyConnector connector = iter.next();
                    connector.start();
                }
                for (Iterator<JmsConnector> iter = jmsConnectors.iterator(); iter.hasNext();) {
                    JmsConnector connector = iter.next();
                    connector.start();
                }
                for (Service service : services) {
                    configureService(service);
                    service.start();
                }
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

            remoteURI = transportConnectors.get(0).getConnectUri();
            String uri = "static:(" + remoteURI + ")";
            if (failover) {
                uri = "static:(failover:(" + remoteURI + "))";
            }
            NetworkConnector connector = new DiscoveryNetworkConnector(new URI(uri));
            connector.setDynamicOnly(dynamicOnly);
            connector.setNetworkTTL(networkTTL);
            connector.setConduitSubscriptions(conduit);
            localBroker.addNetworkConnector(connector);
            maxSetupTime = 2000;
            return connector;
        } else {
            throw new Exception("Remote broker has no registered connectors.");
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

                transportConnectors = broker.getTransportConnectors();
            }

            TransportConnector transport = transportConnectors.get(0);
            transport.setDiscoveryUri(new URI("multicast://default?group=" + groupName));
            NetworkConnector nc = broker.addNetworkConnector("multicast://default?group=" + groupName);
            nc.setNetworkTTL(ttl);
            nc.setSuppressDuplicateQueueSubscriptions(suppressduplicateQueueSubs);
            nc.setDecreaseNetworkConsumerPriority(decreasePriority);
        }

        // Multicasting may take longer to setup
        maxSetupTime = 8000;
    }
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

        connector.start();
        return connector.getName();
    }

    public String addNetworkConnector(String discoveryAddress) throws Exception {
        NetworkConnector connector = brokerService.addNetworkConnector(discoveryAddress);
        connector.start();
        return connector.getName();
    }
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

        connector.stop();
        return brokerService.removeConnector(connector);
    }

    public boolean removeNetworkConnector(String connectorName) throws Exception {
        NetworkConnector connector = brokerService.getNetworkConnectorByName(connectorName);
        connector.stop();
        return brokerService.removeNetworkConnector(connector);
    }
View Full Code Here

Examples of org.apache.activemq.network.NetworkConnector

            return totalCount;
        }
    }

    protected NetworkConnector bridgeBrokersWithIncludedDestination(String localBrokerName, String remoteBrokerName, ActiveMQDestination included, ActiveMQDestination excluded) throws Exception {
        NetworkConnector nc = bridgeBrokers(localBrokerName, remoteBrokerName, false, 4, true);
        nc.addStaticallyIncludedDestination(included);
        if (excluded != null) {
            nc.addExcludedDestination(excluded);
        }
        nc.setPrefetchSize(1);
        return nc;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.