@Override public URI getVmConnectorURI() { return brokerService.getVmConnectorURI(); }
@Override public String getVMURL() { URI answer = brokerService.getVmConnectorURI(); return answer != null ? answer.toString() : ""; }
/** * One way to configure the local connection - this is called by The * BrokerService when the Connector is embedded * * @param service */ public void setBrokerService(BrokerService service) { embeddedConnectionFactory = new ActiveMQConnectionFactory(service.getVmConnectorURI()); }
public ProxyConnector addProxyConnector(ProxyConnector connector) throws Exception { URI uri = getVmConnectorURI(); connector.setLocalUri(uri); proxyConnectors.add(connector); if (isUseJmx()) { registerProxyConnectorMBean(connector); } return connector; }
/** * Adds a new network connector to connect this broker to a federated * network */ public NetworkConnector addNetworkConnector(NetworkConnector connector) throws Exception { connector.setBrokerService(this); connector.setLocalUri(getVmConnectorURI()); // Set a connection filter so that the connector does not establish loop // back connections. connector.setConnectionFilter(new ConnectionFilter() { @Override public boolean connectTo(URI location) { List<TransportConnector> transportConnectors = getTransportConnectors(); for (Iterator<TransportConnector> iter = transportConnectors.iterator(); iter.hasNext();) { try { TransportConnector tc = iter.next(); if (location.equals(tc.getConnectUri())) { return false; } } catch (Throwable e) { } } return true; } }); networkConnectors.add(connector); return connector; }
connector.setLocalUri(getVmConnectorURI()); startNetworkConnector(connector, durableDestinations, networkConnectorStartExecutor);
@Before public void setUp() throws Exception { brokerService = new BrokerService(); brokerService.setPersistent(false); brokerService.start(); factory = new ActiveMQConnectionFactory(BrokerRegistry.getInstance().findFirst().getVmConnectorURI()); producerConnection = factory.createConnection(); producerConnection.start(); producerSession = producerConnection.createSession(false,Session.AUTO_ACKNOWLEDGE); queue = producerSession.createQueue(getClass().getName()); producer = producerSession.createProducer(queue); }
@Override protected void setUp() throws Exception { brokerService = new BrokerService(); brokerService.setPersistent(false); brokerService.start(); factory = new ActiveMQConnectionFactory(BrokerRegistry.getInstance().findFirst().getVmConnectorURI()); consumerConnection = factory.createConnection(); consumerConnection.start(); producerConnection = factory.createConnection(); producerConnection.start(); consumerSession = consumerConnection.createSession(false,Session.AUTO_ACKNOWLEDGE); topic = consumerSession.createTopic(getName()); producerSession = producerConnection.createSession(false,Session.AUTO_ACKNOWLEDGE); consumer = consumerSession.createConsumer(topic); producer = producerSession.createProducer(topic); }
connector.setLocalUri(getBrokerService().getVmConnectorURI()); connector.setBrokerName(getBrokerService().getBrokerName()); connector.setDurableDestinations(getBrokerService().getBroker().getDurableDestinations());
addConsumerInfo(info); } else { synchronized (brokerService.getVmConnectorURI()) { addConsumerInfo(info);
addConsumerInfo(consumerInfo); } else { synchronized (brokerService.getVmConnectorURI()) { addConsumerInfo(consumerInfo);
answer = answer != null ? answer : ""; statsMessage.setString("stomp+ssl", answer); URI uri = brokerService.getVmConnectorURI(); answer = uri != null ? uri.toString() : ""; statsMessage.setString("vm", answer);
advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_ORIGIN_BROKER_ID, id); String url = getBrokerService().getVmConnectorURI().toString();
@Override public URI getVmConnectorURI() { return brokerService.getVmConnectorURI(); }
@Override public String getVMURL() { URI answer = brokerService.getVmConnectorURI(); return answer != null ? answer.toString() : ""; }
/** * One way to configure the local connection - this is called by The * BrokerService when the Connector is embedded * * @param service */ public void setBrokerService(BrokerService service) { embeddedConnectionFactory = new ActiveMQConnectionFactory(service.getVmConnectorURI()); }
/** * One way to configure the local connection - this is called by The * BrokerService when the Connector is embedded * * @param service */ public void setBrokerService(BrokerService service) { embeddedConnectionFactory = new ActiveMQConnectionFactory(service.getVmConnectorURI()); }
/** * One way to configure the local connection - this is called by The * BrokerService when the Connector is embedded * * @param service */ public void setBrokerService(BrokerService service) { embeddedConnectionFactory = new ActiveMQConnectionFactory(service.getVmConnectorURI()); }
public ProxyConnector addProxyConnector(ProxyConnector connector) throws Exception { URI uri = getVmConnectorURI(); connector.setLocalUri(uri); proxyConnectors.add(connector); if (isUseJmx()) { registerProxyConnectorMBean(connector); } return connector; }
public ProxyConnector addProxyConnector(ProxyConnector connector) throws Exception { URI uri = getVmConnectorURI(); connector.setLocalUri(uri); proxyConnectors.add(connector); if (isUseJmx()) { registerProxyConnectorMBean(connector); } return connector; }