Class EmbeddedChannelFactory

java.lang.Object
org.jboss.netty.handler.codec.embedder.EmbeddedChannelFactory
All Implemented Interfaces:
ChannelFactory, ExternalResourceReleasable

final class EmbeddedChannelFactory extends Object implements ChannelFactory
  • Field Details

  • Constructor Details

    • EmbeddedChannelFactory

      private EmbeddedChannelFactory()
  • Method Details

    • newChannel

      public Channel 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
      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, 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 ChannelFactory.shutdown() before do any action
      Specified by:
      releaseExternalResources in interface ChannelFactory
      Specified by:
      releaseExternalResources in interface ExternalResourceReleasable
    • shutdown

      public void shutdown()
      Description copied from interface: ChannelFactory
      Shudown the ChannelFactory and all the resource it created internal.
      Specified by:
      shutdown in interface ChannelFactory