Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.TransportConnection


                return (numDests + 1) == broker.getRegionBroker().getDestinations().length;
            }
        }));

        // verify removed from connection security context
        TransportConnection brokerConnection = broker.getTransportConnectors().get(0).getConnections().get(0);
        TransportConnectionState transportConnectionState = brokerConnection.lookupConnectionState(conn.getConnectionInfo().getConnectionId());
        assertEquals("no destinations", 0, transportConnectionState.getContext().getSecurityContext().getAuthorizedWriteDests().size());
    }
View Full Code Here


        // only subscribe to the specific destinations included in the <dynamicallyIncludedDestinations> list
        // so let's test that the filter is correct, let's also test the subscription on the localbroker
        // is correct

        // the bridge on the remote broker has the correct filter
        TransportConnection bridgeConnection = getDuplexBridgeConnectionFromRemote();
        assertNotNull(bridgeConnection);
        DemandForwardingBridge duplexBridge = getDuplexBridgeFromConnection(bridgeConnection);
        assertNotNull(duplexBridge);
        NetworkBridgeConfiguration configuration = getConfigurationFromNetworkBridge(duplexBridge);
        assertNotNull(configuration);
View Full Code Here

    }

    public TransportConnection getDuplexBridgeConnectionFromRemote() {
        TransportConnector transportConnector = remoteBroker.getTransportConnectorByScheme("tcp");
        CopyOnWriteArrayList<TransportConnection> transportConnections = transportConnector.getConnections();
        TransportConnection duplexBridgeConnectionFromRemote = transportConnections.get(0);
        return duplexBridgeConnectionFromRemote;
    }
View Full Code Here

        // only subscribe to the specific destinations included in the <dynamicallyIncludedDestinations> list
        // so let's test that the filter is correct, let's also test the subscription on the localbroker
        // is correct

        // the bridge on the remote broker has the correct filter
        TransportConnection bridgeConnection = getDuplexBridgeConnectionFromRemote();
        assertNotNull(bridgeConnection);
        DemandForwardingBridge duplexBridge = getDuplexBridgeFromConnection(bridgeConnection);
        assertNotNull(duplexBridge);
        NetworkBridgeConfiguration configuration = getConfigurationFromNetworkBridge(duplexBridge);
        assertNotNull(configuration);
View Full Code Here

        DemandForwardingBridge bridge = (DemandForwardingBridge) f.get(bridgeConnection);
        return bridge;
    }

    public TransportConnection getDuplexBridgeConnectionFromRemote() {
        TransportConnection duplexBridgeConnectionFromRemote =
                remoteBroker.getTransportConnectorByName("tcp://localhost:" + REMOTE_BROKER_TCP_PORT)
                        .getConnections().get(0);
        return duplexBridgeConnectionFromRemote;
    }
View Full Code Here

            @Override
            public boolean isSatisified() throws Exception {
                return connector.getConnections().size() == 1;
            }
        }));
        TransportConnection transportConnection = connector.getConnections().get(0);
        Map<ProducerId, ProducerBrokerExchange> exchanges = getProducerExchangeFromConn(transportConnection);
        assertEquals(1, exchanges.size());
        ProducerBrokerExchange exchange = exchanges.values().iterator().next();

        // so this is the reason for the test... we don't want these exchanges to hold a reference
View Full Code Here

        // only subscribe to the specific destinations included in the <dynamicallyIncludedDestinations> list
        // so let's test that the filter is correct, let's also test the subscription on the localbroker
        // is correct

        // the bridge on the remote broker has the correct filter
        TransportConnection bridgeConnection = getDuplexBridgeConnectionFromRemote();
        assertNotNull(bridgeConnection);
        DemandForwardingBridge duplexBridge = getDuplexBridgeFromConnection(bridgeConnection);
        assertNotNull(duplexBridge);
        NetworkBridgeConfiguration configuration = getConfigurationFromNetworkBridge(duplexBridge);
        assertNotNull(configuration);
View Full Code Here

        DemandForwardingBridge bridge = (DemandForwardingBridge) f.get(bridgeConnection);
        return bridge;
    }

    public TransportConnection getDuplexBridgeConnectionFromRemote() {
        TransportConnection duplexBridgeConnectionFromRemote =
                remoteBroker.getTransportConnectorByName("tcp://localhost:" + REMOTE_BROKER_TCP_PORT)
                        .getConnections().get(0);
        return duplexBridgeConnectionFromRemote;
    }
View Full Code Here

        if (oldContext != null) {
            if (oldContext.getConnection() != null) {
                Connection connection = oldContext.getConnection();
                LOG.warn("Stealing link for clientId {} From Connection {}", clientId, oldContext.getConnection());
                if (connection instanceof TransportConnection) {
                    TransportConnection transportConnection = (TransportConnection) connection;
                    transportConnection.stopAsync();
                } else {
                    connection.stop();
                }
            } else {
                LOG.error("No Connection found for {}", oldContext);
View Full Code Here

TOP

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

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.