Package org.apache.mina.transport.socket.nio

Examples of org.apache.mina.transport.socket.nio.NioProcessor


   * 以一个执行器构造
   * @param executor    线程执行器
   */
  public MinaTransferFactory(Executor executor)
  {
    this.connector = new NioSocketConnector(new  NioProcessor(executor));
    this.connector.setHandler(new MinaNioHandler());
  }
View Full Code Here


        List<IoFilter> filters = configuration.getFilters();

        address = new InetSocketAddress(configuration.getHost(), configuration.getPort());

        acceptor = new NioSocketAcceptor(
            new NioProcessor(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaSocketAcceptor")));

        // acceptor connectorConfig
        acceptorConfig = acceptor.getSessionConfig();
        configureCodecFactory("Mina2Consumer", acceptor, configuration);
        ((NioSocketAcceptor) acceptor).setReuseAddress(true);
View Full Code Here

        List<IoFilter> filters = configuration.getFilters();

        address = new InetSocketAddress(configuration.getHost(), configuration.getPort());

        connector = new NioSocketConnector(
            new NioProcessor(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaSocketConnector")));

        // connector config
        connectorConfig = connector.getSessionConfig();
        connector.getFilterChain().addLast("threadPool",
                                           new ExecutorFilter(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaThreadPool")));
View Full Code Here

            throw new IllegalArgumentException("transferExchange=true is not supported for datagram protocol");
        }

        address = new InetSocketAddress(configuration.getHost(), configuration.getPort());
        connector = new NioDatagramConnector(
            new NioProcessor(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaDatagramConnector")));
        connectorConfig = connector.getSessionConfig();
        connector.getFilterChain().addLast("threadPool",
                                           new ExecutorFilter(this.getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "MinaThreadPool")));
        if (minaLogger) {
            connector.getFilterChain().addLast("logger", new LoggingFilter());
View Full Code Here

TOP

Related Classes of org.apache.mina.transport.socket.nio.NioProcessor

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.