|
XNIO version 1.1.1.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.xnio.Xnio
public abstract class Xnio
The XNIO entry point class.
Constructor Summary | |
---|---|
protected |
Xnio()
Construct an XNIO provider instance. |
Method Summary | |
---|---|
abstract void |
close()
Close this XNIO provider. |
static Xnio |
create()
Create an instance of the default XNIO provider. |
static Xnio |
createNio()
Deprecated. Will be removed in 1.2. Please use create() instead, or use the constructor of your desired implementation. |
static Xnio |
createNio(Executor handlerExecutor,
int readSelectorThreads,
int writeSelectorThreads,
int connectSelectorThreads)
Deprecated. Will be removed in 1.2. Please use create() instead, or use the constructor of your desired implementation. |
static Xnio |
createNio(Executor handlerExecutor,
ThreadFactory selectorThreadFactory,
int readSelectorThreads,
int writeSelectorThreads,
int connectSelectorThreads)
Deprecated. Will be removed in 1.2. Please use create() instead, or use the constructor of your desired implementation. |
static Xnio |
createNio(int readSelectorThreads,
int writeSelectorThreads,
int connectSelectorThreads)
Deprecated. Will be removed in 1.2. Please use create() instead, or use the constructor of your desired implementation. |
IoFuture<Closeable> |
createOneWayPipeConnection(IoHandler<? super StreamSourceChannel> sourceHandler,
IoHandler<? super StreamSinkChannel> sinkHandler)
Create a single one-way pipe connection. |
IoFuture<Closeable> |
createPipeConnection(IoHandler<? super StreamChannel> leftHandler,
IoHandler<? super StreamChannel> rightHandler)
Create a single pipe connection. |
ChannelSource<StreamChannel> |
createPipeServer(IoHandlerFactory<? super StreamChannel> handlerFactory)
Create a pipe "server". |
ChannelSource<StreamSinkChannel> |
createPipeSinkServer(IoHandlerFactory<? super StreamSourceChannel> handlerFactory)
Create a one-way pipe "server". |
ChannelSource<StreamSourceChannel> |
createPipeSourceServer(IoHandlerFactory<? super StreamSinkChannel> handlerFactory)
Create a one-way pipe "server". |
ConfigurableFactory<CloseableTcpConnector> |
createTcpConnector()
Create a configurable TCP connector. |
ConfigurableFactory<CloseableTcpConnector> |
createTcpConnector(Executor executor)
Create a configurable TCP connector. |
ConfigurableFactory<Closeable> |
createTcpServer(Executor executor,
IoHandlerFactory<? super TcpChannel> handlerFactory,
SocketAddress... bindAddresses)
Create a TCP server. |
ConfigurableFactory<Closeable> |
createTcpServer(IoHandlerFactory<? super TcpChannel> handlerFactory,
SocketAddress... bindAddresses)
Create a TCP server. |
ConfigurableFactory<Closeable> |
createUdpServer(boolean multicast,
IoHandlerFactory<? super UdpChannel> handlerFactory,
SocketAddress... bindAddresses)
Create a UDP server. |
ConfigurableFactory<Closeable> |
createUdpServer(Executor executor,
boolean multicast,
IoHandlerFactory<? super UdpChannel> handlerFactory,
SocketAddress... bindAddresses)
Create a UDP server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Xnio()
Method Detail |
---|
public static Xnio create() throws IOException
xnio.provider
system property. Any failure to create the XNIO provider will cause an java.io.IOException
to be thrown.
IOException
- the the XNIO provider could not be created@Deprecated public static Xnio createNio() throws IOException
create()
instead, or use the constructor of your desired implementation.
IOException
- if an I/O error occurs while starting the service@Deprecated public static Xnio createNio(int readSelectorThreads, int writeSelectorThreads, int connectSelectorThreads) throws IOException, IllegalArgumentException
create()
instead, or use the constructor of your desired implementation.
readSelectorThreads
- the number of threads to assign for readable eventswriteSelectorThreads
- the number of threads to assign for writable eventsconnectSelectorThreads
- the number of threads to assign for connect/accept events
IOException
- if an I/O error occurs while starting the service
IllegalArgumentException
- if a given argument is not valid@Deprecated public static Xnio createNio(Executor handlerExecutor, int readSelectorThreads, int writeSelectorThreads, int connectSelectorThreads) throws IOException, IllegalArgumentException
create()
instead, or use the constructor of your desired implementation.
handlerExecutor
- the executor to use to handle eventsreadSelectorThreads
- the number of threads to assign for readable eventswriteSelectorThreads
- the number of threads to assign for writable eventsconnectSelectorThreads
- the number of threads to assign for connect/accept events
IOException
- if an I/O error occurs while starting the service
IllegalArgumentException
- if a given argument is not valid@Deprecated public static Xnio createNio(Executor handlerExecutor, ThreadFactory selectorThreadFactory, int readSelectorThreads, int writeSelectorThreads, int connectSelectorThreads) throws IOException, IllegalArgumentException
create()
instead, or use the constructor of your desired implementation.
handlerExecutor
- the executor to use to handle eventsselectorThreadFactory
- the selector thread factory to usereadSelectorThreads
- the number of threads to assign for readable eventswriteSelectorThreads
- the number of threads to assign for writable eventsconnectSelectorThreads
- the number of threads to assign for connect/accept events
IOException
- if an I/O error occurs while starting the service
IllegalArgumentException
- if a given argument is not validpublic ConfigurableFactory<Closeable> createTcpServer(Executor executor, IoHandlerFactory<? super TcpChannel> handlerFactory, SocketAddress... bindAddresses)
executor
- the executor to use to execute the handlershandlerFactory
- the factory which will produce handlers for inbound connectionsbindAddresses
- the addresses to bind to
public ConfigurableFactory<Closeable> createTcpServer(IoHandlerFactory<? super TcpChannel> handlerFactory, SocketAddress... bindAddresses)
handlerFactory
- the factory which will produce handlers for inbound connectionsbindAddresses
- the addresses to bind to
public ConfigurableFactory<CloseableTcpConnector> createTcpConnector(Executor executor)
executor
- the executor to use to execute the handlers
public ConfigurableFactory<CloseableTcpConnector> createTcpConnector()
public ConfigurableFactory<Closeable> createUdpServer(Executor executor, boolean multicast, IoHandlerFactory<? super UdpChannel> handlerFactory, SocketAddress... bindAddresses)
multicast
- true
if the UDP server should be multicast-capableexecutor
- the executor to use to execute the handlershandlerFactory
- the factory which will produce handlers for each channelbindAddresses
- the addresses to bind
public ConfigurableFactory<Closeable> createUdpServer(boolean multicast, IoHandlerFactory<? super UdpChannel> handlerFactory, SocketAddress... bindAddresses)
multicast
- true
if the UDP server should be multicast-capablehandlerFactory
- the factory which will produce handlers for each channelbindAddresses
- the addresses to bind
public ChannelSource<StreamChannel> createPipeServer(IoHandlerFactory<? super StreamChannel> handlerFactory)
handlerFactory
- the server handler factory
public ChannelSource<StreamSourceChannel> createPipeSourceServer(IoHandlerFactory<? super StreamSinkChannel> handlerFactory)
handlerFactory
- the server handler factory
public ChannelSource<StreamSinkChannel> createPipeSinkServer(IoHandlerFactory<? super StreamSourceChannel> handlerFactory)
handlerFactory
- the server handler factory
public IoFuture<Closeable> createPipeConnection(IoHandler<? super StreamChannel> leftHandler, IoHandler<? super StreamChannel> rightHandler)
leftHandler
- the handler for the "left" side of the piperightHandler
- the handler for the "right" side of the pipe
public IoFuture<Closeable> createOneWayPipeConnection(IoHandler<? super StreamSourceChannel> sourceHandler, IoHandler<? super StreamSinkChannel> sinkHandler)
sourceHandler
- the handler for the "source" side of the pipesinkHandler
- the handler for the "sink" side of the pipe
public abstract void close() throws IOException
close
in interface Closeable
IOException
|
XNIO version 1.1.1.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |