Class Nio2ServiceFactory
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, Closeable, FactoryManagerHolder, IoServiceEventListenerManager, IoServiceFactory, ExecutorServiceCarrier
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractCloseable
AbstractCloseable.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AsynchronousChannelGroupprivate final CloseableExecutorServiceFields inherited from class AbstractCloseable
closeFuture, futureLock, stateFields inherited from class AbstractLoggingBean
log -
Constructor Summary
ConstructorsConstructorDescriptionNio2ServiceFactory(FactoryManager factoryManager, CloseableExecutorService service, CloseableExecutorService resumeTasks) -
Method Summary
Modifier and TypeMethodDescriptioncreateAcceptor(IoHandler handler) createConnector(IoHandler handler) createSession(Nio2Service service, IoHandler handler, AsynchronousSocketChannel socket, SocketAddress address) protected voiddoCloseImmediately is called once and only once with state == ImmediateMethods inherited from class AbstractIoServiceFactory
autowireCreatedService, getExecutorService, getFactoryManager, getIoServiceEventListener, getNioWorkers, setIoServiceEventListenerMethods inherited from class AbstractCloseable
addCloseFutureListener, builder, close, doCloseGracefully, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenerMethods inherited from class AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Field Details
-
group
-
resuming
-
-
Constructor Details
-
Nio2ServiceFactory
public Nio2ServiceFactory(FactoryManager factoryManager, CloseableExecutorService service, CloseableExecutorService resumeTasks)
-
-
Method Details
-
createConnector
-
createAcceptor
-
createSession
public Nio2Session createSession(Nio2Service service, IoHandler handler, AsynchronousSocketChannel socket, SocketAddress address) throws Throwable - Throws:
Throwable
-
doCloseImmediately
protected void doCloseImmediately()Description copied from class:AbstractCloseabledoCloseImmediately is called once and only once with state == Immediate
Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing
- Overrides:
doCloseImmediatelyin classAbstractIoServiceFactory
-