org.apache.hc.core5.reactor

## Class AbstractIOSessionPool<T>

- java.lang.Object
- - org.apache.hc.core5.reactor.AbstractIOSessionPool<T>

- All Implemented Interfaces:
    Closeable, AutoCloseable, ModalCloseable
  Direct Known Subclasses:
    H2ConnPool

      @Contract(threading=SAFE)
      public abstract class AbstractIOSessionPool<T>
      extends Object
      implements ModalCloseable

  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractIOSessionPool()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `close(CloseMode closeMode)` Closes this process or endpoint and releases any system resources associated with it.
    `void` | `closeIdle(TimeValue idleTime)`
    `protected abstract void` | `closeSession(IOSession ioSession, CloseMode closeMode)`
    `protected abstract Future<IOSession>` | `connectSession(T namedEndpoint, Timeout connectTimeout, FutureCallback<IOSession> callback)`
    `void` | `enumAvailable(Callback<IOSession> callback)`
    `Set<T>` | `getRoutes()`
    `Future<IOSession>` | `getSession(T endpoint, Timeout connectTimeout, FutureCallback<IOSession> callback)`
    `String` | `toString()`
    `protected abstract void` | `validateSession(IOSession ioSession, Callback<Boolean> callback)`

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

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

- - ### Constructor Detail

    - #### AbstractIOSessionPool

          public AbstractIOSessionPool()

  - ### Method Detail

    - #### connectSession

          protected abstract Future<IOSession> connectSession(T namedEndpoint,
                                                              Timeout connectTimeout,
                                                              FutureCallback<IOSession> callback)

    - #### validateSession

          protected abstract void validateSession(IOSession ioSession,
                                                  Callback<Boolean> callback)

    - #### closeSession

          protected abstract void closeSession(IOSession ioSession,
                                               CloseMode closeMode)

    - #### close

          public final void close(CloseMode closeMode)

      Description copied from interface: `ModalCloseable`
      Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.
      Specified by:
        `close` in interface `ModalCloseable`
      Parameters:
        `closeMode` - How to close the receiver.

    - #### close

          public final void close()

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`

    - #### getSession

          public final Future<IOSession> getSession(T endpoint,
                                                    Timeout connectTimeout,
                                                    FutureCallback<IOSession> callback)

    - #### enumAvailable

          public final void enumAvailable(Callback<IOSession> callback)

    - #### closeIdle

          public final void closeIdle(TimeValue idleTime)

    - #### getRoutes

          public final Set<T> getRoutes()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.