Package org.jboss.netty.channel.local

Examples of org.jboss.netty.channel.local.DefaultLocalClientChannelFactory


  private final Condition _shutdownReqCondition = _lock.newCondition();
  private final Condition _shutdownCondition = _lock.newCondition();

  public SimpleTestClientConnection(ByteOrder bufferByteOrder)
  {
    _clientBootstrap = new ClientBootstrap(new DefaultLocalClientChannelFactory());
    _clientBootstrap.setOption("bufferFactory",
                               DirectChannelBufferFactory.getInstance(bufferByteOrder));
  }
View Full Code Here


    _serverChannel = _serverBootstrap.bind(_serverAddress);
  }

  private void setupClient()
  {
    _clientBootstrap = new ClientBootstrap(new DefaultLocalClientChannelFactory());

    _clientBootstrap.setPipelineFactory(new ChannelPipelineFactory()
    {
      @Override
      public ChannelPipeline getPipeline() throws Exception
View Full Code Here

    _timeoutPolicy = timeoutPolicy;
  }

  public static SimpleTestHttpClient createLocal(TimeoutPolicy timeoutPolicy) throws Exception
  {
    return new SimpleTestHttpClient(new DefaultLocalClientChannelFactory(), timeoutPolicy);
  }
View Full Code Here

    });

    sb.setPipeline(pipeline);

    sb.bind(address);
    ClientBootstrap cb = new ClientBootstrap(new DefaultLocalClientChannelFactory());
    cb.getPipeline().addLast("1", new SimpleChannelHandler() {
      @Override
      public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e)
          throws Exception {
        super.channelConnected(ctx, e);
View Full Code Here

                new OioDatagramChannelFactory(executor),
                DatagramChannelFactory.class);

        // Local transports
        register(ctx,
                new DefaultLocalClientChannelFactory(),
                LocalClientChannelFactory.class);
        register(ctx,
                new DefaultLocalServerChannelFactory(),
                LocalServerChannelFactory.class);
View Full Code Here

        // Start up the server.
        sb.bind(socketAddress);

        // Configure the client.
        ClientBootstrap cb = new ClientBootstrap(
                new DefaultLocalClientChannelFactory());

        // Set up the client-side pipeline factory.
        cb.setPipelineFactory(new ChannelPipelineFactory() {
            public ChannelPipeline getPipeline() throws Exception {
                return Channels.pipeline(
View Full Code Here

        sb.setPipelineFactory(new LocalServerPipelineFactory(eventExecutor));
        sb.bind(socketAddress);

        ClientBootstrap cb = new ClientBootstrap(
                new DefaultLocalClientChannelFactory());

        cb.setPipelineFactory(new ChannelPipelineFactory() {
            public ChannelPipeline getPipeline() throws Exception {
                return Channels.pipeline(
                        new StringDecoder(),
View Full Code Here

        }
    }

    protected ChannelFactory createChannelFactory(SocketAddress remoteAddress) throws Exception {
        if (remoteAddress instanceof LocalAddress) {
            return new DefaultLocalClientChannelFactory();
        } else {
            throw new ServletException(
                    "Unsupported remote address type: " +
                    remoteAddress.getClass().getName());
        }
View Full Code Here

                new OioDatagramChannelFactory(executor),
                DatagramChannelFactory.class);

        // Local transports
        register(ctx,
                new DefaultLocalClientChannelFactory(),
                LocalClientChannelFactory.class);
        register(ctx,
                new DefaultLocalServerChannelFactory(),
                LocalServerChannelFactory.class);
View Full Code Here

        }
    }

    protected ChannelFactory createChannelFactory(SocketAddress remoteAddress) throws Exception {
        if (remoteAddress instanceof LocalAddress) {
            return new DefaultLocalClientChannelFactory();
        } else {
            throw new ServletException(
                    "Unsupported remote address type: " +
                    remoteAddress.getClass().getName());
        }
View Full Code Here

TOP

Related Classes of org.jboss.netty.channel.local.DefaultLocalClientChannelFactory

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.