Package org.apache.activemq.transport

Examples of org.apache.activemq.transport.Transport


        Transport transport = TransportFactory.connect(connector.getServer().getConnectURI());
        return transport;
    }
   
    protected Transport createRemoteTransport() throws Exception {
        Transport transport = TransportFactory.connect(remoteConnector.getServer().getConnectURI());
        return transport;
    }
View Full Code Here


    protected String getLocalURI() {
        return "vm://localhost";
    }
   
    protected StubConnection createConnection() throws Exception {
        Transport transport = TransportFactory.connect(connector.getServer().getConnectURI());
        StubConnection connection = new StubConnection(transport);
        connections.add(connection);
        return connection;
    }
View Full Code Here

        connections.add(connection);
        return connection;
    }

    protected StubConnection createRemoteConnection() throws Exception {
        Transport transport = TransportFactory.connect(remoteConnector.getServer().getConnectURI());
        StubConnection connection = new StubConnection(transport);
        connections.add(connection);
        return connection;
    }
View Full Code Here

            } catch (URISyntaxException e) {
                LOG.warn("could not apply query parameters: " + parameters + " to: " + connectUri, e);
            }
            LOG.info("Establishing network connection from " + localURI + " to " + connectUri);

            Transport remoteTransport;
            Transport localTransport;
            try {
                // Allows the transport to access the broker's ssl configuration.
                SslContext.setCurrentSslContext(getBrokerService().getSslContext());
                try {
                    remoteTransport = TransportFactory.connect(connectUri);
View Full Code Here

    public void sendToStomp(StompFrame command) throws IOException {
        if (trace) {
            LOG.trace("Sending: \n" + command);
        }
        Transport n = next;
        if (n!=null) {
            n.oneway(command);
        }
    }
View Full Code Here

                        URI uri = fanoutHandler.uri;
                        try {
                            LOG.debug("Stopped: " + this);
                            LOG.debug("Attempting connect to: " + uri);
                            Transport t = TransportFactory.compositeConnect(uri);
                            fanoutHandler.transport = t;
                            t.setTransportListener(fanoutHandler);
                            if (started) {
                                restoreTransport(fanoutHandler);
                            }
                            LOG.debug("Connection established");
                            fanoutHandler.reconnectDelay = initialReconnectDelay;
View Full Code Here

    protected void processInboundConnection(Command command) {
        DatagramEndpoint endpoint = (DatagramEndpoint)command.getFrom();
        if (LOG.isDebugEnabled()) {
            LOG.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command);
        }
        Transport transport = null;
        synchronized (transports) {
            transport = transports.get(endpoint);
            if (transport == null) {
                if (usingWireFormatNegotiation && !command.isWireFormatInfo()) {
                    LOG.error("Received inbound server communication from: " + command.getFrom() + " expecting WireFormatInfo but was command: " + command);
View Full Code Here

            WireFormat wf = createWireFormat(options);
            int port = location.getPort();
            OpenWireFormat openWireFormat = asOpenWireFormat(wf);
            UdpTransport transport = (UdpTransport) createTransport(location, wf);

            Transport configuredTransport = configure(transport, wf, options, true);
            UdpTransportServer server = new UdpTransportServer(location, transport, configuredTransport, createReplayStrategy());
            return server;
        } catch (URISyntaxException e) {
            throw IOExceptionSupport.create(e);
        } catch (Exception e) {
View Full Code Here

public class FailoverTransportFactory extends TransportFactory {

    @Override
    public Transport doConnect(URI location) throws IOException {
        try {
            Transport transport = createTransport(URISupport.parseComposite(location));
            transport = new MutexTransport(transport);
            transport = new ResponseCorrelator(transport);
            return transport;
        } catch (URISyntaxException e) {
            throw new IOException("Invalid location: " + location);
View Full Code Here

    public final void handleTransportFailure(IOException e) throws InterruptedException {
        if (LOG.isTraceEnabled()) {
            LOG.trace(this + " handleTransportFailure: " + e);
        }
        Transport transport = connectedTransport.getAndSet(null);
        if (transport == null) {
            // sync with possible in progress reconnect
            synchronized (reconnectMutex) {
                transport = connectedTransport.getAndSet(null);
            }
        }
        if (transport != null) {

            disposeTransport(transport);

            boolean reconnectOk = false;
            synchronized (reconnectMutex) {
                if (started) {
                    LOG.warn("Transport (" + transport.getRemoteAddress() + ") failed to " + connectedTransportURI
                            + " , attempting to automatically reconnect due to: " + e);
                    LOG.debug("Transport failed with the following exception:", e);
                    reconnectOk = true;
                }
                initialized = false;
View Full Code Here

TOP

Related Classes of org.apache.activemq.transport.Transport

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.