Package org.hornetq.core.remoting.impl.netty

Examples of org.hornetq.core.remoting.impl.netty.NettyAcceptor


            public void handleEvent(final StreamConnection connection) {
                MESSAGING_LOGGER.debugf("Switching to %s protocol for %s http-acceptor", HORNETQ_REMOTING, acceptorName);
                SocketChannel channel = new WrappingXnioSocketChannel(connection);
                RemotingService remotingService = hornetqServer.getRemotingService();

                NettyAcceptor acceptor = (NettyAcceptor)remotingService.getAcceptor(acceptorName);
                acceptor.transfer(channel);
                connection.getSourceChannel().resumeReads();
            }
        };
    }
View Full Code Here


      HashMap<String, Object> conf = new HashMap<String, Object>();
      conf.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, -1l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler acceptorHandler = new SimpleBufferHandler(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      SimpleBufferHandler2 connectorHandler = new SimpleBufferHandler2(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

      HashMap<String, Object> conf = new HashMap<String, Object>();
      conf.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, -1l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler acceptorHandler = new SimpleBufferHandler(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      SimpleBufferHandler2 connectorHandler = new SimpleBufferHandler2(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

      HashMap<String, Object> conf = new HashMap<String, Object>();
      conf.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, -1l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler acceptorHandler = new SimpleBufferHandler(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

      HashMap<String, Object> conf = new HashMap<String, Object>();
      conf.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, -1l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler acceptorHandler = new SimpleBufferHandler(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

      conf.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, 500l);
      conf.put(TransportConstants.HTTP_CLIENT_IDLE_PROP_NAME, 500l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler acceptorHandler = new SimpleBufferHandler(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      SimpleBufferHandler connectorHandler = new SimpleBufferHandler(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, -1l);
      conf.put(TransportConstants.HTTP_RESPONSE_TIME_PROP_NAME, 500l);
      conf.put(TransportConstants.HTTP_SERVER_SCAN_PERIOD_PROP_NAME, 5000l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler acceptorHandler = new SimpleBufferHandler(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      BogusResponseHandler connectorHandler = new BogusResponseHandler(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, -1l);
      conf.put(TransportConstants.HTTP_RESPONSE_TIME_PROP_NAME, 500l);
      conf.put(TransportConstants.HTTP_SERVER_SCAN_PERIOD_PROP_NAME, 5000l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler2 acceptorHandler = new SimpleBufferHandler2(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      BogusResponseHandler connectorHandler = new BogusResponseHandler(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

         public void connectionCreated(final Connection connection, final ProtocolType protocol)
         {
         }
      };
      NettyAcceptor acceptor = new NettyAcceptor(params,
                                                 handler,
                                                 null,
                                                 listener,
                                                 Executors.newCachedThreadPool(),
                                                 Executors.newScheduledThreadPool(ConfigurationImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE));

      acceptor.start();
      Assert.assertTrue(acceptor.isStarted());
      acceptor.stop();
      Assert.assertFalse(acceptor.isStarted());
      UnitTestCase.checkFreePort(TransportConstants.DEFAULT_PORT);

      acceptor.start();
      Assert.assertTrue(acceptor.isStarted());
      acceptor.stop();
      Assert.assertFalse(acceptor.isStarted());
      UnitTestCase.checkFreePort(TransportConstants.DEFAULT_PORT);
   }
View Full Code Here

      HashMap<String, Object> conf = new HashMap<String, Object>();
      conf.put(TransportConstants.HTTP_ENABLED_PROP_NAME, true);
      conf.put(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD, -1l);
      DummyConnectionLifeCycleListener acceptorListener = new DummyConnectionLifeCycleListener(connCreatedLatch);
      SimpleBufferHandler acceptorHandler = new SimpleBufferHandler(acceptorLatch);
      acceptor = new NettyAcceptor(conf, acceptorHandler, null, acceptorListener, threadPool, scheduledThreadPool);
      acceptor.start();

      SimpleBufferHandler2 connectorHandler = new SimpleBufferHandler2(connectorLatch);
      connector = new NettyConnector(conf,
                                     connectorHandler,
View Full Code Here

TOP

Related Classes of org.hornetq.core.remoting.impl.netty.NettyAcceptor

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.