Package org.apache.qpid.server.transport

Examples of org.apache.qpid.server.transport.TransportProvider


    protected void onActivate()
    {
        Collection<Transport> transports = getTransports();
        Set<AmqpProtocolVersion> supported = convertFromModelProtocolsToAmqp(getProtocols());

        TransportProvider transportProvider = null;
        final HashSet<Transport> transportSet = new HashSet<Transport>(transports);
        for(TransportProviderFactory tpf : (new QpidServiceLoader<TransportProviderFactory>()).instancesOf(TransportProviderFactory.class))
        {
            if(tpf.getSupportedTransports().contains(transports))
            {
                transportProvider = tpf.getTransportProvider(transportSet);
            }
        }

        if(transportProvider == null)
        {
            throw new IllegalConfigurationException("No transport providers found which can satisfy the requirement to support the transports: " + transports);
        }

        SSLContext sslContext = null;
        if (transports.contains(Transport.SSL) || transports.contains(Transport.WSS))
        {
            sslContext = createSslContext();
        }

        AmqpProtocolVersion defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();

        _transport = transportProvider.createTransport(transportSet,
                                                       sslContext,
                                                       this,
                                                       supported,
                                                       defaultSupportedProtocolReply);
View Full Code Here


        }
        else
        {
            Collection<Transport> transports = getTransports();

            TransportProvider transportProvider = null;
            final HashSet<Transport> transportSet = new HashSet<Transport>(transports);
            for (TransportProviderFactory tpf : (new QpidServiceLoader()).instancesOf(TransportProviderFactory.class))
            {
                if (tpf.getSupportedTransports().contains(transports))
                {
                    transportProvider = tpf.getTransportProvider(transportSet);
                }
            }

            if (transportProvider == null)
            {
                throw new IllegalConfigurationException(
                        "No transport providers found which can satisfy the requirement to support the transports: "
                        + transports
                );
            }

            SSLContext sslContext = null;
            if (transports.contains(Transport.SSL) || transports.contains(Transport.WSS))
            {
                sslContext = createSslContext();
            }

            Protocol defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();

            _transport = transportProvider.createTransport(transportSet,
                                                           sslContext,
                                                           this,
                                                           getProtocols(),
                                                           defaultSupportedProtocolReply);
View Full Code Here

        }
        else
        {
            Collection<Transport> transports = getTransports();

            TransportProvider transportProvider = null;
            final HashSet<Transport> transportSet = new HashSet<Transport>(transports);
            for (TransportProviderFactory tpf : (new QpidServiceLoader()).instancesOf(TransportProviderFactory.class))
            {
                if (tpf.getSupportedTransports().contains(transports))
                {
                    transportProvider = tpf.getTransportProvider(transportSet);
                }
            }

            if (transportProvider == null)
            {
                throw new IllegalConfigurationException(
                        "No transport providers found which can satisfy the requirement to support the transports: "
                        + transports
                );
            }

            SSLContext sslContext = null;
            if (transports.contains(Transport.SSL) || transports.contains(Transport.WSS))
            {
                sslContext = createSslContext();
            }
            Protocol defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();

            _transport = transportProvider.createTransport(transportSet,
                                                           sslContext,
                                                           this,
                                                           getProtocols(),
                                                           defaultSupportedProtocolReply);
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.transport.TransportProvider

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.