AbstractEndpoint.Handler (Apache Tomcat 8.5.57 API Documentation)

org.apache.tomcat.util.net

## Interface AbstractEndpoint.Handler<S>

- All Known Implementing Classes:
    AbstractProtocol.ConnectionHandler
  Enclosing class:
    AbstractEndpoint<S>

      public static interface AbstractEndpoint.Handler<S>

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `AbstractEndpoint.Handler.SocketState` Different types of socket states to react upon.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getGlobal()` Obtain the GlobalRequestProcessor associated with the handler.
    `Set<S>` | `getOpenSockets()` Obtain the currently open sockets.
    `void` | `pause()` Inform the handler that the endpoint has stopped accepting any new connections.
    `AbstractEndpoint.Handler.SocketState` | `process(SocketWrapperBase<S> socket, SocketEvent status)` Process the provided socket with the given current status.
    `void` | `recycle()` Recycle resources associated with the handler.
    `void` | `release(SocketWrapperBase<S> socketWrapper)` Release any resources associated with the given SocketWrapper.

- - ### Method Detail

    - #### process

          AbstractEndpoint.Handler.SocketState process(SocketWrapperBase<S> socket,
                                                     SocketEvent status)

      Process the provided socket with the given current status.
      Parameters:
        `socket` - The socket to process
        `status` - The current socket status
      Returns:
        The state of the socket after processing

    - #### getGlobal

          Object getGlobal()

      Obtain the GlobalRequestProcessor associated with the handler.
      Returns:
        the GlobalRequestProcessor

    - #### getOpenSockets

          Set<S> getOpenSockets()

      Obtain the currently open sockets.
      Returns:
        The sockets for which the handler is tracking a currently open connection

    - #### release

          void release(SocketWrapperBase<S> socketWrapper)

      Release any resources associated with the given SocketWrapper.
      Parameters:
        `socketWrapper` - The socketWrapper to release resources for

    - #### pause

          void pause()

      Inform the handler that the endpoint has stopped accepting any new connections. Typically, the endpoint will be stopped shortly afterwards but it is possible that the endpoint will be resumed so the handler should not assume that a stop will follow.

    - #### recycle

          void recycle()

      Recycle resources associated with the handler.

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