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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientSocketChannelFactoryprivate final ChannelSink -
Constructor Summary
ConstructorsConstructorDescriptionHttpTunnelingClientSocketChannelFactory(ClientSocketChannelFactory clientSocketChannelFactory) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionnewChannel(ChannelPipeline pipeline) voidReleases the external resources that this factory depends on to function.voidshutdown()Shudown the ChannelFactory and all the resource it created internal.
-
Field Details
-
sink
-
clientSocketChannelFactory
-
-
Constructor Details
-
HttpTunnelingClientSocketChannelFactory
public HttpTunnelingClientSocketChannelFactory(ClientSocketChannelFactory clientSocketChannelFactory) Creates a new instance.
-
-
Method Details
-
newChannel
Description copied from interface:ChannelFactory- Specified by:
newChannelin interfaceChannelFactory- Specified by:
newChannelin interfaceClientSocketChannelFactory- Parameters:
pipeline- theChannelPipelinewhich is going to be attached to the newChannel- Returns:
- the newly open channel
-
releaseExternalResources
public void releaseExternalResources()Description copied from interface:ChannelFactoryReleases 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,Executors 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. This will also callChannelFactory.shutdown()before do any action- Specified by:
releaseExternalResourcesin interfaceChannelFactory- Specified by:
releaseExternalResourcesin interfaceExternalResourceReleasable
-
shutdown
public void shutdown()Description copied from interface:ChannelFactoryShudown the ChannelFactory and all the resource it created internal.- Specified by:
shutdownin interfaceChannelFactory
-