Package org.codehaus.activemq.transport

Examples of org.codehaus.activemq.transport.TransportChannelFactory


     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here


     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here

     * Factory method to create a TransportChannel from a URL
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);

        TransportChannelFactory factory =
                TransportChannelProvider.getFactory(uri);

        BrokerConnector brokerConnector = null;
        boolean created = false;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                brokerConnector = brokerContext.getConnectorByURL(theURLString);
                if (brokerConnector == null) {
                    brokerConnector = createBrokerConnector(theURLString);
                    brokerContext.registerConnector(theURLString, brokerConnector);
                    startedEmbeddedBrokers.add(theURLString);
                    created = true;
                }
            }
        }
        TransportChannel transportChannel = factory.create(getWireFormat(), uri);
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
        return transportChannel;
    }
View Full Code Here

     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here

     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here

     * Factory method to create a TransportChannel from a URL
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);

        TransportChannelFactory factory =
                TransportChannelProvider.getFactory(uri);

        BrokerConnector brokerConnector = null;
        boolean created = false;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                brokerConnector = (BrokerConnector) brokers.get(theURLString);
                if (brokerConnector == null) {
                    brokerConnector = createBrokerConnector(theURLString);
                    registerBroker(theURLString, brokerConnector);
                    startedEmbeddedBrokers.add(theURLString);
                    created = true;
                }
            }
        }
        TransportChannel transportChannel = factory.create(getWireFormat(), uri);
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
        return transportChannel;
    }
View Full Code Here

     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.transport.TransportChannelFactory

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.