org.jboss.netty.channel.xnio
Class XnioServerChannelFactory

java.lang.Object
  extended by org.jboss.netty.channel.xnio.XnioServerChannelFactory
All Implemented Interfaces:
ChannelFactory, ServerChannelFactory, ExternalResourceReleasable

public class XnioServerChannelFactory
extends Object
implements ServerChannelFactory

A ServerChannelFactory which uses JBoss XNIO as its I/O provider.

Please note that you must specify an XnioAcceptedChannelHandlerFactory when you create a BoundServer to integrate XNIO into Netty.

Version:
$Rev: 1685 $, $Date: 2009-08-28 16:15:49 +0900 (금, 28 8 2009) $
Author:
The Netty Project (netty-dev@lists.jboss.org), Trustin Lee (tlee@redhat.com)

Constructor Summary
XnioServerChannelFactory(BoundServer xnioServer)
           
 
Method Summary
 XnioServerChannel newChannel(ChannelPipeline pipeline)
          Creates and opens a new Channel and attaches the specified ChannelPipeline to the new Channel.
 void releaseExternalResources()
          Releases the external resources that this factory depends on to function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XnioServerChannelFactory

public XnioServerChannelFactory(BoundServer xnioServer)
Method Detail

newChannel

public XnioServerChannel 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 ServerChannelFactory
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.

Specified by:
releaseExternalResources in interface ChannelFactory
Specified by:
releaseExternalResources in interface ExternalResourceReleasable


Copyright © 2008-2009 JBoss, by Red Hat. All Rights Reserved.