Examples of QpidThreadExecutor


Examples of org.apache.qpid.thread.QpidThreadExecutor

            case SOCKET:
                return new SocketTransportConnection(new SocketTransportConnection.SocketConnectorFactory()
                {
                    public IoConnector newSocketConnector()
                    {
                        ExistingSocketConnector connector = new ExistingSocketConnector(1,new QpidThreadExecutor());

                        Socket socket = TransportConnection.removeOpenSocket(details.getHost());

                        if (socket != null)
                        {
                            _logger.info("Using existing Socket:" + socket);

                            ((ExistingSocketConnector) connector).setOpenSocket(socket);
                        }
                        else
                        {
                            throw new IllegalArgumentException("Active Socket must be provided for broker " +
                                                               "with 'socket://<SocketID>' transport:" + details);
                        }
                        return connector;
                    }
                });
            case TCP:
                return new SocketTransportConnection(new SocketTransportConnection.SocketConnectorFactory()
                {
                    public IoConnector newSocketConnector()
                    {
                        SocketConnector result;
                        // FIXME - this needs to be sorted to use the new Mina MultiThread SA.
                        if (Boolean.getBoolean("qpidnio"))
                        {
                            _logger.warn("Using Qpid MultiThreaded NIO - " + (System.getProperties().containsKey("qpidnio")
                                                                              ? "Qpid NIO is new default"
                                                                              : "Sysproperty 'qpidnio' is set"));
                            result = new MultiThreadSocketConnector(1, new QpidThreadExecutor());
                        }
                        else
                        {
                            _logger.info("Using Mina NIO");
                            result = new SocketConnector(1, new QpidThreadExecutor()); // non-blocking connector
                        }
                        // Don't have the connector's worker thread wait around for other connections (we only use
                        // one SocketConnector per connection at the moment anyway). This allows short-running
                        // clients (like unit tests) to complete quickly.
                        result.setWorkerTimeout(0);
View Full Code Here

Examples of org.apache.qpid.thread.QpidThreadExecutor

            _sslFactory = sslFactory;
        }

        if (_useNIO)
        {
            _socketConnector = new MultiThreadSocketConnector(1, new QpidThreadExecutor());
        }
        else
        {
            _socketConnector = new SocketConnector(1, new QpidThreadExecutor()); // non-blocking
                                                                                 // connector
        }

        SocketConnectorConfig cfg = (SocketConnectorConfig) _socketConnector.getDefaultConfig();
        String s = "";
View Full Code Here

Examples of org.apache.qpid.thread.QpidThreadExecutor

            _sslFactory = sslFactory;
        }

        if (_useNIO)
        {
            _socketConnector = new MultiThreadSocketConnector(1, new QpidThreadExecutor());
        }
        else
        {
            _socketConnector = new SocketConnector(1, new QpidThreadExecutor()); // non-blocking
                                                                                 // connector
        }

        SocketConnectorConfig cfg = (SocketConnectorConfig) _socketConnector.getDefaultConfig();
        String s = "";
View Full Code Here

Examples of org.apache.qpid.thread.QpidThreadExecutor

            _sslFactory = sslFactory;
        }
       
        if (_useNIO)
        {
            _socketConnector = new MultiThreadSocketConnector(1, new QpidThreadExecutor());
        }
        else
        {
            _socketConnector = new SocketConnector(1, new QpidThreadExecutor()); // non-blocking
                                                                                 // connector
        }
       
        org.apache.mina.common.ByteBuffer.setUseDirectBuffers(Boolean.getBoolean("amqj.enableDirectBuffers"));
        // the MINA default is currently to use the pooled allocator although this may change in future
View Full Code Here

Examples of org.apache.qpid.thread.QpidThreadExecutor

            case SOCKET:
                return new SocketTransportConnection(new SocketTransportConnection.SocketConnectorFactory()
                {
                    public IoConnector newSocketConnector()
                    {
                        ExistingSocketConnector connector = new ExistingSocketConnector(1,new QpidThreadExecutor());

                        Socket socket = TransportConnection.removeOpenSocket(details.getHost());

                        if (socket != null)
                        {
                            _logger.info("Using existing Socket:" + socket);

                            ((ExistingSocketConnector) connector).setOpenSocket(socket);
                        }
                        else
                        {
                            throw new IllegalArgumentException("Active Socket must be provided for broker " +
                                                               "with 'socket://<SocketID>' transport:" + details);
                        }
                        return connector;
                    }
                });
            case TCP:
                return new SocketTransportConnection(new SocketTransportConnection.SocketConnectorFactory()
                {
                    public IoConnector newSocketConnector()
                    {
                        SocketConnector result;
                        // FIXME - this needs to be sorted to use the new Mina MultiThread SA.
                        if (Boolean.getBoolean("qpidnio"))
                        {
                            _logger.warn("Using Qpid MultiThreaded NIO - " + (System.getProperties().containsKey("qpidnio")
                                                                              ? "Qpid NIO is new default"
                                                                              : "Sysproperty 'qpidnio' is set"));
                            result = new MultiThreadSocketConnector(1, new QpidThreadExecutor());
                        }
                        else
                        {
                            _logger.info("Using Mina NIO");
                            result = new SocketConnector(1, new QpidThreadExecutor()); // non-blocking connector
                        }
                        // Don't have the connector's worker thread wait around for other connections (we only use
                        // one SocketConnector per connection at the moment anyway). This allows short-running
                        // clients (like unit tests) to complete quickly.
                        result.setWorkerTimeout(0);
View Full Code Here

Examples of org.apache.qpid.thread.QpidThreadExecutor

            _sslFactory = sslFactory;
        }

        if (_useNIO)
        {
            _socketConnector = new MultiThreadSocketConnector(1, new QpidThreadExecutor());
        }
        else
        {
            _socketConnector = new SocketConnector(1, new QpidThreadExecutor()); // non-blocking
                                                                                 // connector
        }

        org.apache.mina.common.ByteBuffer.setUseDirectBuffers(Boolean.getBoolean("amqj.enableDirectBuffers"));
        // the MINA default is currently to use the pooled allocator although this may change in future
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.