org.apache.hc.core5.testing.nio

## Class ClientSessionEndpoint

- java.lang.Object
- - org.apache.hc.core5.testing.nio.ClientSessionEndpoint

- All Implemented Interfaces:
    Closeable, AutoCloseable, ModalCloseable

      @Contract(threading=SAFE_CONDITIONAL)
      public final class ClientSessionEndpoint
      extends Object
      implements ModalCloseable

  Client endpoint that can be used to initiate HTTP message exchanges.
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientSessionEndpoint(IOSession ioSession)`

  - ### Method Summary

    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` | `execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)`
    `void` | `execute(AsyncClientExchangeHandler exchangeHandler, HttpContext context)`
    `<T> Future<T>` | `execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> callback)`
    `<T> Future<T>` | `execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context, FutureCallback<T> callback)`
    `<T> Future<T>` | `execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HttpContext context, FutureCallback<T> callback)`
    `void` | `execute(Command command, Command.Priority priority)`
    `boolean` | `isOpen()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ClientSessionEndpoint

          public ClientSessionEndpoint(IOSession ioSession)

  - ### Method Detail

    - #### execute

          public void execute(Command command,
                     Command.Priority priority)

    - #### execute

          public void execute(AsyncClientExchangeHandler exchangeHandler,
                     HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
                     HttpContext context)

    - #### execute

          public void execute(AsyncClientExchangeHandler exchangeHandler,
                     HttpContext context)

    - #### execute

          public <T> Future<T> execute(AsyncRequestProducer requestProducer,
                              AsyncResponseConsumer<T> responseConsumer,
                              HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
                              HttpContext context,
                              FutureCallback<T> callback)

    - #### execute

          public <T> Future<T> execute(AsyncRequestProducer requestProducer,
                              AsyncResponseConsumer<T> responseConsumer,
                              HttpContext context,
                              FutureCallback<T> callback)

    - #### execute

          public <T> Future<T> execute(AsyncRequestProducer requestProducer,
                              AsyncResponseConsumer<T> responseConsumer,
                              FutureCallback<T> callback)

    - #### isOpen

          public boolean isOpen()

    - #### close

          public 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 void close()
                     throws IOException

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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