public interface ChannelFactory extends ExternalResourceReleasable
with a certain communication entity such as a network socket. For example,
NioServerSocketChannelFactory creates a channel which has a
NIO-based server socket as its underlying communication entity.
Once a new
Channel is created, the
was specified as a parameter in the
is attached to the new
Channel, and starts to handle all associated
To shut down a network application service which is managed by a factory. you should follow the following steps:
Channel newChannel(ChannelPipeline pipeline)
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 call
shutdown() before do any action
Copyright © 2008-2016 The Netty Project. All Rights Reserved.