Examples of MutexTransport


Examples of org.apache.activemq.transport.MutexTransport

    @SuppressWarnings("rawtypes")
    @Override
    public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception {
        transport = super.serverConfigure(transport, format, options);

        MutexTransport mutex = transport.narrow(MutexTransport.class);
        if (mutex != null) {
            mutex.setSyncOnCommand(true);
        }

        return transport;
    }
View Full Code Here

Examples of org.apache.activemq.transport.MutexTransport

    @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

Examples of org.apache.activemq.transport.MutexTransport

    @SuppressWarnings("rawtypes")
    @Override
    public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception {
        transport = super.serverConfigure(transport, format, options);

        MutexTransport mutex = transport.narrow(MutexTransport.class);
        if (mutex != null) {
            mutex.setSyncOnCommand(true);
        }

        return transport;
    }
View Full Code Here

Examples of org.apache.activemq.transport.MutexTransport

public class MockTransportFactory extends TransportFactory {

    public Transport doConnect(URI location) throws URISyntaxException, Exception {
        Transport transport = createTransport(URISupport.parseComposite(location));
        transport = new MutexTransport(transport);
        transport = new ResponseCorrelator(transport);
        return transport;
    }
View Full Code Here

Examples of org.apache.activemq.transport.MutexTransport

     *
     * @param transport
     * @return the Transport
     */
    public static Transport configure(Transport transport) {
        transport = new MutexTransport(transport);
        transport = new ResponseCorrelator(transport);
        return transport;
    }
View Full Code Here

Examples of org.apache.activemq.transport.MutexTransport

    @SuppressWarnings("rawtypes")
    @Override
    public Transport serverConfigure(Transport transport, WireFormat format, HashMap options) throws Exception {
        transport = super.serverConfigure(transport, format, options);

        MutexTransport mutex = transport.narrow(MutexTransport.class);
        if (mutex != null) {
            mutex.setSyncOnCommand(true);
        }

        return transport;
    }
View Full Code Here

Examples of org.apache.activemq.transport.MutexTransport

public class FanoutTransportFactory extends TransportFactory {

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

Examples of org.apache.activemq.transport.MutexTransport

public class FailoverTransportFactory extends TransportFactory {

    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

Examples of org.apache.activemq.transport.MutexTransport

        latch.await();
        consumer.close();
        session.close();

        ResponseCorrelator respCorr = (ResponseCorrelator) connection.getTransport();
        MutexTransport mutexTrans = (MutexTransport) respCorr.getNext();
        FailoverTransport failoverTrans = (FailoverTransport) mutexTrans.getNext();
        Field stateTrackerField = FailoverTransport.class.getDeclaredField("stateTracker");
        stateTrackerField.setAccessible(true);
        ConnectionStateTracker stateTracker = (ConnectionStateTracker) stateTrackerField.get(failoverTrans);
        Field statesField = ConnectionStateTracker.class.getDeclaredField("connectionStates");
        statesField.setAccessible(true);
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.