Package org.apache.tomcat.util.net
Class Nio2Endpoint.Nio2Acceptor
- java.lang.Object
-
- org.apache.tomcat.util.net.Acceptor<AsynchronousSocketChannel>
-
- org.apache.tomcat.util.net.Nio2Endpoint.Nio2Acceptor
-
- All Implemented Interfaces:
Runnable
,CompletionHandler<AsynchronousSocketChannel,Void>
- Enclosing class:
- Nio2Endpoint
protected class Nio2Endpoint.Nio2Acceptor extends Acceptor<AsynchronousSocketChannel> implements CompletionHandler<AsynchronousSocketChannel,Void>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.tomcat.util.net.Acceptor
Acceptor.AcceptorState
-
-
Field Summary
Fields Modifier and Type Field Description protected int
errorDelay
-
Constructor Summary
Constructors Constructor Description Nio2Acceptor(AbstractEndpoint<?,AsynchronousSocketChannel> endpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
completed(AsynchronousSocketChannel socket, Void attachment)
void
failed(Throwable t, Void attachment)
void
run()
void
stop(int waitSeconds)
Signals the Acceptor to stop.-
Methods inherited from class org.apache.tomcat.util.net.Acceptor
getState, handleExceptionWithDelay, stop
-
-
-
-
Constructor Detail
-
Nio2Acceptor
public Nio2Acceptor(AbstractEndpoint<?,AsynchronousSocketChannel> endpoint)
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfaceRunnable
- Overrides:
run
in classAcceptor<AsynchronousSocketChannel>
-
stop
public void stop(int waitSeconds)
Signals the Acceptor to stop.- Overrides:
stop
in classAcceptor<AsynchronousSocketChannel>
- Parameters:
waitSeconds
- Ignored for NIO2.
-
completed
public void completed(AsynchronousSocketChannel socket, Void attachment)
- Specified by:
completed
in interfaceCompletionHandler<AsynchronousSocketChannel,Void>
-
failed
public void failed(Throwable t, Void attachment)
- Specified by:
failed
in interfaceCompletionHandler<AsynchronousSocketChannel,Void>
-
-