public class DefaultNioServerSocketChannelFactory extends NioServerSocketChannelFactory
DefaultNioServerSocketChannelFactory
Created on Jan 3, 2012 at 12:12:02 PMattributes, threadGroup| Constructor and Description |
|---|
DefaultNioServerSocketChannelFactory()
Create a new instance of
DefaultNioServerSocketChannelFactory |
DefaultNioServerSocketChannelFactory(AsynchronousChannelGroup threadGroup)
Create a new instance of
DefaultNioServerSocketChannelFactory |
| Modifier and Type | Method and Description |
|---|---|
NioChannel |
acceptChannel(AsynchronousServerSocketChannel listener)
Wrapper function for accept().
|
AsynchronousServerSocketChannel |
createServerChannel(int port,
int backlog,
InetAddress ifAddress,
boolean reuseAddress)
Returns a server socket channel which uses only the specified network
interface on the local host, is bound to a the specified port, and uses
the specified connection backlog.
|
void |
destroy()
Destroy the factory
|
void |
handshake(NioChannel channel)
Extra function to initiate the handshake.
|
void |
init()
Initialize the factory
|
void |
initChannel(NioChannel channel)
Initialize the specified
NioChannel |
createSecureFactory, createServerChannel, createServerChannel, createServerSocketChannelFactory, getDefault, getDefault, open, setAttributepublic DefaultNioServerSocketChannelFactory()
DefaultNioServerSocketChannelFactorypublic DefaultNioServerSocketChannelFactory(AsynchronousChannelGroup threadGroup)
DefaultNioServerSocketChannelFactorythreadGroup - public void init()
throws IOException
NioServerSocketChannelFactoryinit in class NioServerSocketChannelFactoryIOExceptionpublic void destroy()
throws IOException
NioServerSocketChannelFactorydestroy in class NioServerSocketChannelFactoryIOExceptionpublic void initChannel(NioChannel channel) throws Exception
NioServerSocketChannelFactoryNioChannelinitChannel in class NioServerSocketChannelFactorychannel - The channel to be initializedExceptionpublic void handshake(NioChannel channel) throws IOException
NioServerSocketChannelFactoryhandshake in class NioServerSocketChannelFactoryIOExceptionpublic AsynchronousServerSocketChannel createServerChannel(int port, int backlog, InetAddress ifAddress, boolean reuseAddress) throws IOException
NioServerSocketChannelFactorycreateServerChannel in class NioServerSocketChannelFactoryport - the port to listen tobacklog - how many connections are queuedifAddress - the network interface address to useAsynchronousServerSocketChannelIOException - for networking errorspublic NioChannel acceptChannel(AsynchronousServerSocketChannel listener) throws IOException
NioServerSocketChannelFactoryacceptChannel in class NioServerSocketChannelFactorylistener - The Asynchronous Server Socket channel that will accept a new
connectionNioChannel representing the new connectionIOExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.