Nio2Endpoint.Nio2Acceptor (Apache Tomcat 9.0.37 API Documentation)

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 and Description
    --- | ---
    `protected int` | `errorDelay`

    - ### Fields inherited from class org.apache.tomcat.util.net.Acceptor

      `state`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Nio2Acceptor(AbstractEndpoint<?,AsynchronousSocketChannel> endpoint)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `completed(AsynchronousSocketChannel socket, Void attachment)`
    `void` | `failed(Throwable t, Void attachment)`
    `void` | `run()`

    - ### Methods inherited from class org.apache.tomcat.util.net.Acceptor

      `getState, handleExceptionWithDelay`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### errorDelay

          protected int errorDelay

  - ### Constructor Detail

    - #### Nio2Acceptor

          public Nio2Acceptor(AbstractEndpoint<?,AsynchronousSocketChannel> endpoint)

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `Acceptor<AsynchronousSocketChannel>`

    - #### completed

          public void completed(AsynchronousSocketChannel socket,
                                Void attachment)

      Specified by:
        `completed` in interface `CompletionHandler<AsynchronousSocketChannel,Void>`

    - #### failed

          public void failed(Throwable t,
                             Void attachment)

      Specified by:
        `failed` in interface `CompletionHandler<AsynchronousSocketChannel,Void>`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.