public class DefaultNioServerSocketChannelFactory extends NioServerSocketChannelFactory
DefaultNioServerSocketChannelFactory
Created on Jan 3, 2012 at 12:12:02 PMattributes, internalExecutor, 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,
boolean internalExecutor)
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, setAttribute
public DefaultNioServerSocketChannelFactory()
DefaultNioServerSocketChannelFactory
public DefaultNioServerSocketChannelFactory(AsynchronousChannelGroup threadGroup)
DefaultNioServerSocketChannelFactory
threadGroup
- public void init() throws IOException
NioServerSocketChannelFactory
init
in class NioServerSocketChannelFactory
IOException
public void destroy() throws IOException
NioServerSocketChannelFactory
destroy
in class NioServerSocketChannelFactory
IOException
public void initChannel(NioChannel channel) throws Exception
NioServerSocketChannelFactory
NioChannel
initChannel
in class NioServerSocketChannelFactory
channel
- The channel to be initializedException
public void handshake(NioChannel channel) throws IOException
NioServerSocketChannelFactory
handshake
in class NioServerSocketChannelFactory
IOException
public AsynchronousServerSocketChannel createServerChannel(int port, int backlog, InetAddress ifAddress, boolean reuseAddress, boolean internalExecutor) throws IOException
NioServerSocketChannelFactory
createServerChannel
in class NioServerSocketChannelFactory
port
- the port to listen tobacklog
- how many connections are queuedifAddress
- the network interface address to useAsynchronousServerSocketChannel
IOException
- for networking errorspublic NioChannel acceptChannel(AsynchronousServerSocketChannel listener) throws IOException
NioServerSocketChannelFactory
acceptChannel
in class NioServerSocketChannelFactory
listener
- The Asynchronous Server Socket channel that will accept a new
connectionNioChannel
representing the new connectionIOException
Copyright © 2016 JBoss by Red Hat. All rights reserved.