final class EmbeddedChannelFactory extends java.lang.Object implements ChannelFactory
| Modifier and Type | Field and Description |
|---|---|
(package private) static ChannelFactory |
INSTANCE |
| Modifier | Constructor and Description |
|---|---|
private |
EmbeddedChannelFactory() |
| Modifier and Type | Method and Description |
|---|---|
Channel |
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.
|
static final ChannelFactory INSTANCE
public Channel newChannel(ChannelPipeline pipeline)
ChannelFactorynewChannel in interface ChannelFactorypipeline - the ChannelPipeline which is going to be
attached to the new Channelpublic void releaseExternalResources()
ChannelFactoryExecutors 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 ChannelFactory.shutdown() before do any actionreleaseExternalResources in interface ChannelFactoryreleaseExternalResources in interface ExternalResourceReleasablepublic void shutdown()
ChannelFactoryshutdown in interface ChannelFactory