org.jboss.netty.channel.local

## Class DefaultLocalServerChannelFactory

- java.lang.Object
- - org.jboss.netty.channel.local.DefaultLocalServerChannelFactory

- All Implemented Interfaces:
    ChannelFactory, LocalServerChannelFactory, ServerChannelFactory, ExternalResourceReleasable

      public class DefaultLocalServerChannelFactory
      extends Object
      implements LocalServerChannelFactory

  The default `LocalServerChannelFactory` implementation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLocalServerChannelFactory()` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `LocalServerChannel` | `newChannel(ChannelPipeline pipeline)` Creates and opens a new `Channel` and attaches the specified `ChannelPipeline` to the new `Channel`.
    `void` | `releaseExternalResources()` Release all the previous created channels.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultLocalServerChannelFactory

          public DefaultLocalServerChannelFactory()

      Creates a new instance.

  - ### Method Detail

    - #### newChannel

          public LocalServerChannel 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`
      Specified by:
        `newChannel` in interface `LocalServerChannelFactory`
      Specified by:
        `newChannel` in interface `ServerChannelFactory`
      Parameters:
        `pipeline` - the `ChannelPipeline` which is going to be attached to the new `Channel`
      Returns:
        the newly open channel

    - #### releaseExternalResources

          public void releaseExternalResources()

      Release all the previous created channels. This takes care of calling `LocalChannelRegistry.unregister(LocalAddress)` for each of them.
      Specified by:
        `releaseExternalResources` in interface `ChannelFactory`
      Specified by:
        `releaseExternalResources` in interface `ExternalResourceReleasable`

Copyright © 2008-2012 The Netty Project. All Rights Reserved.