Class HttpTunnelingClientSocketChannelFactory
- java.lang.Object
-
- org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketChannelFactory
-
- All Implemented Interfaces:
ChannelFactory
,ClientSocketChannelFactory
,ExternalResourceReleasable
public class HttpTunnelingClientSocketChannelFactory extends java.lang.Object implements ClientSocketChannelFactory
Creates a client-sideSocketChannel
which connects to anHttpTunnelingServlet
to communicate with the server application behind theHttpTunnelingServlet
. Please refer to the package summary for the detailed usage.
-
-
Field Summary
Fields Modifier and Type Field Description private ClientSocketChannelFactory
clientSocketChannelFactory
private ChannelSink
sink
-
Constructor Summary
Constructors Constructor Description HttpTunnelingClientSocketChannelFactory(ClientSocketChannelFactory clientSocketChannelFactory)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketChannel
newChannel(ChannelPipeline pipeline)
void
releaseExternalResources()
Releases the external resources that this factory depends on to function.void
shutdown()
Shudown the ChannelFactory and all the resource it created internal.
-
-
-
Field Detail
-
sink
private final ChannelSink sink
-
clientSocketChannelFactory
private final ClientSocketChannelFactory clientSocketChannelFactory
-
-
Constructor Detail
-
HttpTunnelingClientSocketChannelFactory
public HttpTunnelingClientSocketChannelFactory(ClientSocketChannelFactory clientSocketChannelFactory)
Creates a new instance.
-
-
Method Detail
-
newChannel
public SocketChannel newChannel(ChannelPipeline pipeline)
Description copied from interface:ChannelFactory
- Specified by:
newChannel
in interfaceChannelFactory
- Specified by:
newChannel
in interfaceClientSocketChannelFactory
- Parameters:
pipeline
- theChannelPipeline
which is going to be attached to the newChannel
- 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. This will also callChannelFactory.shutdown()
before do any action- Specified by:
releaseExternalResources
in interfaceChannelFactory
- Specified by:
releaseExternalResources
in interfaceExternalResourceReleasable
-
shutdown
public void shutdown()
Description copied from interface:ChannelFactory
Shudown the ChannelFactory and all the resource it created internal.- Specified by:
shutdown
in interfaceChannelFactory
-
-