Package org.apache.qpid.transport.network

Examples of org.apache.qpid.transport.network.IncomingNetworkTransport


                                                         include_1_0, include_0_10, include_0_9_1, include_0_9, include_0_8,serverConfig);

                    final NetworkTransportConfiguration settings =
                                    new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(supported, defaultSupportedProtocolReply);

                    transport.accept(settings, protocolEngineFactory, null);

                    ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
                                    new QpidAcceptor(transport,QpidAcceptor.Transport.TCP, supported));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
                }
            }

            if (serverConfig.getEnableSSL())
            {
                final String keystorePath = serverConfig.getConnectorKeyStorePath();
                final String keystorePassword = serverConfig.getConnectorKeyStorePassword();
                final String keystoreType = serverConfig.getConnectorKeyStoreType();
                final String keyManagerFactoryAlgorithm = serverConfig.getConnectorKeyManagerFactoryAlgorithm();
                final SSLContext sslContext;
                if(serverConfig.getConnectorTrustStorePath()!=null)
                {
                    sslContext = SSLContextFactory.buildClientContext(serverConfig.getConnectorTrustStorePath(),
                                                                      serverConfig.getConnectorTrustStorePassword(),
                                                                      serverConfig.getConnectorTrustStoreType(),
                                                                      serverConfig.getConnectorTrustManagerFactoryAlgorithm(),
                                                                      keystorePath,
                                                                      keystorePassword, keystoreType, keyManagerFactoryAlgorithm,
                                                                      serverConfig.getCertAlias());
                }
                else
                {
                    sslContext = SSLContextFactory.buildServerContext(keystorePath, keystorePassword, keystoreType, keyManagerFactoryAlgorithm);
                }

                for(int sslPort : sslPorts)
                {
                    final InetSocketAddress inetSocketAddress = new InetSocketAddress(bindAddress, sslPort);

                    final Set<AmqpProtocolVersion> supported =
                                    getSupportedVersions(sslPort, exclude_1_0, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8,
                                                         include_1_0, include_0_10, include_0_9_1, include_0_9, include_0_8, serverConfig);
                    final NetworkTransportConfiguration settings =
                        new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(supported, defaultSupportedProtocolReply);

                    transport.accept(settings, protocolEngineFactory, sslContext);

                    ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
                            new QpidAcceptor(transport,QpidAcceptor.Transport.SSL, supported));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP/SSL", sslPort));
                }
View Full Code Here


                                                         include_1_0, include_0_10, include_0_9_1, include_0_9, include_0_8,serverConfig);

                    final NetworkTransportConfiguration settings =
                                    new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(supported, defaultSupportedProtocolReply);

                    transport.accept(settings, protocolEngineFactory, null);

                    ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
                                    new QpidAcceptor(transport,QpidAcceptor.Transport.TCP, supported));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
                }
            }

            if (serverConfig.getEnableSSL())
            {
                final String keystorePath = serverConfig.getConnectorKeyStorePath();
                final String keystorePassword = serverConfig.getConnectorKeyStorePassword();
                final String keystoreType = serverConfig.getConnectorKeyStoreType();
                final String keyManagerFactoryAlgorithm = serverConfig.getConnectorKeyManagerFactoryAlgorithm();
                final SSLContext sslContext;
                if(serverConfig.getConnectorTrustStorePath()!=null)
                {
                    sslContext = SSLContextFactory.buildClientContext(serverConfig.getConnectorTrustStorePath(),
                                                                      serverConfig.getConnectorTrustStorePassword(),
                                                                      serverConfig.getConnectorTrustStoreType(),
                                                                      serverConfig.getConnectorTrustManagerFactoryAlgorithm(),
                                                                      keystorePath,
                                                                      keystorePassword, keystoreType, keyManagerFactoryAlgorithm,
                                                                      serverConfig.getCertAlias());
                }
                else
                {
                    sslContext = SSLContextFactory.buildServerContext(keystorePath, keystorePassword, keystoreType, keyManagerFactoryAlgorithm);
                }

                for(int sslPort : sslPorts)
                {
                    final InetSocketAddress inetSocketAddress = new InetSocketAddress(bindAddress, sslPort);

                    final Set<AmqpProtocolVersion> supported =
                                    getSupportedVersions(sslPort, exclude_1_0, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8,
                                                         include_1_0, include_0_10, include_0_9_1, include_0_9, include_0_8, serverConfig);
                    final NetworkTransportConfiguration settings =
                        new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(supported, defaultSupportedProtocolReply);

                    transport.accept(settings, protocolEngineFactory, sslContext);

                    ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
                            new QpidAcceptor(transport,QpidAcceptor.Transport.SSL, supported));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP/SSL", sslPort));
                }
View Full Code Here

                    final Set<AmqpProtocolVersion> supported =
                                    getSupportedVersions(port, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8);
                    final NetworkTransportConfiguration settings =
                                    new ServerNetworkTransportConfiguration(serverConfig, port, bindAddress.getHostName(), Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(hostName, supported);

                    transport.accept(settings, protocolEngineFactory, null);
                    ApplicationRegistry.getInstance().addAcceptor(new InetSocketAddress(bindAddress, port),
                                    new QpidAcceptor(transport,"TCP"));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
                }
            }

            if (serverConfig.getEnableSSL())
            {
                final String keystorePath = serverConfig.getConnectorKeyStorePath();
                final String keystorePassword = serverConfig.getConnectorKeyStorePassword();
                final String certType = serverConfig.getConnectorCertType();
                final SSLContext sslContext = SSLContextFactory.buildServerContext(keystorePath, keystorePassword, certType);

                for(int sslPort : sslPorts)
                {
                    final Set<AmqpProtocolVersion> supported =
                                    getSupportedVersions(sslPort, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8);
                    final NetworkTransportConfiguration settings =
                        new ServerNetworkTransportConfiguration(serverConfig, sslPort, bindAddress.getHostName(), Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(hostName, supported);

                    transport.accept(settings, protocolEngineFactory, sslContext);
                    ApplicationRegistry.getInstance().addAcceptor(new InetSocketAddress(bindAddress, sslPort),
                            new QpidAcceptor(transport,"TCP"));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP/SSL", sslPort));
                }
            }
View Full Code Here

                                    getSupportedVersions(port, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8, serverConfig);

                    final NetworkTransportConfiguration settings =
                                    new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(supported, defaultSupportedProtocolReply);

                    transport.accept(settings, protocolEngineFactory, null);

                    ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
                                    new QpidAcceptor(transport,"TCP"));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
                }
            }

            if (serverConfig.getEnableSSL())
            {
                final String keystorePath = serverConfig.getConnectorKeyStorePath();
                final String keystorePassword = serverConfig.getConnectorKeyStorePassword();
                final String keyManagerFactoryAlgorithm = serverConfig.getConnectorKeyManagerFactoryAlgorithm();
                final SSLContext sslContext = SSLContextFactory.buildServerContext(keystorePath, keystorePassword, keyManagerFactoryAlgorithm);

                for(int sslPort : sslPorts)
                {
                    final InetSocketAddress inetSocketAddress = new InetSocketAddress(bindAddress, sslPort);

                    final Set<AmqpProtocolVersion> supported =
                                    getSupportedVersions(sslPort, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8, serverConfig);
                    final NetworkTransportConfiguration settings =
                        new ServerNetworkTransportConfiguration(serverConfig, inetSocketAddress, Transport.TCP);

                    final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
                    final MultiVersionProtocolEngineFactory protocolEngineFactory =
                                    new MultiVersionProtocolEngineFactory(supported, defaultSupportedProtocolReply);

                    transport.accept(settings, protocolEngineFactory, sslContext);

                    ApplicationRegistry.getInstance().addAcceptor(inetSocketAddress,
                            new QpidAcceptor(transport,"TCP"));
                    CurrentActor.get().message(BrokerMessages.LISTENING("TCP/SSL", sslPort));
                }
View Full Code Here

TOP

Related Classes of org.apache.qpid.transport.network.IncomingNetworkTransport

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.