org.jboss.netty.channel.socket.http

## Class HttpTunnelingClientSocketChannelFactory

- java.lang.Object
- - org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketChannelFactory

- All Implemented Interfaces:
    ChannelFactory, ClientSocketChannelFactory, ExternalResourceReleasable

      public class HttpTunnelingClientSocketChannelFactory
      extends Object
      implements ClientSocketChannelFactory

  Creates a client-side `SocketChannel` which connects to an `HttpTunnelingServlet` to communicate with the server application behind the `HttpTunnelingServlet`. Please refer to the package summary for the detailed usage.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpTunnelingClientSocketChannelFactory(ClientSocketChannelFactory clientSocketChannelFactory)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SocketChannel` | `newChannel(ChannelPipeline pipeline)` Creates and opens a new `Channel` and attaches the specified `ChannelPipeline` to the new `Channel`.
    `void` | `releaseExternalResources()` Releases the external resources that this factory depends on to function.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HttpTunnelingClientSocketChannelFactory

          public HttpTunnelingClientSocketChannelFactory(ClientSocketChannelFactory clientSocketChannelFactory)

      Creates a new instance.

  - ### Method Detail

    - #### newChannel

          public SocketChannel newChannel(ChannelPipeline pipeline)

      Description copied from interface: `ChannelFactory`
      Creates and opens a new `Channel` and attaches the specified `ChannelPipeline` to the new `Channel`.
      Specified by:
        `newChannel` in interface `ChannelFactory`
      Specified by:
        `newChannel` in interface `ClientSocketChannelFactory`
      Parameters:
        `pipeline` - the `ChannelPipeline` which is going to be attached to the new `Channel`
      Returns:
        the newly open channel

    - #### releaseExternalResources

          public void releaseExternalResources()

      Description copied from interface: `ChannelFactory`
      Releases the external resources that this factory depends on to function. An external resource is a resource that this factory didn't create by itself. For example, `Executor`s that you specified in the factory constructor are external resources. You can call this method to release all external resources conveniently when the resources are not used by this factory or any other part of your application. An unexpected behavior will be resulted in if the resources are released when there's an open channel which is managed by this factory.
      Specified by:
        `releaseExternalResources` in interface `ChannelFactory`
      Specified by:
        `releaseExternalResources` in interface `ExternalResourceReleasable`

Copyright © 2008-2012 The Netty Project. All Rights Reserved.