Class AsyncRequester

java.lang.Object
org.apache.hc.core5.testing.nio.AsyncRequester
All Implemented Interfaces:
AutoCloseable, org.apache.hc.core5.reactor.ConnectionInitiator
Direct Known Subclasses:
HttpTestClient

public class AsyncRequester extends Object implements org.apache.hc.core5.reactor.ConnectionInitiator
  • Constructor Summary

    Constructors
    Constructor
    Description
    AsyncRequester(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    awaitShutdown(org.apache.hc.core5.util.TimeValue waitTime)
     
    void
     
    Future<org.apache.hc.core5.reactor.IOSession>
    connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint, SocketAddress remoteAddress, SocketAddress localAddress, org.apache.hc.core5.util.Timeout timeout, Object attachment, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)
     
    protected void
    execute(org.apache.hc.core5.reactor.IOEventHandlerFactory ioEventHandlerFactory)
     
    org.apache.hc.core5.reactor.IOReactorStatus
     
    void
     
    Future<org.apache.hc.core5.reactor.IOSession>
    requestSession(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)
     
    void
    shutdown(org.apache.hc.core5.util.TimeValue graceTime)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AsyncRequester

      public AsyncRequester(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig)
  • Method Details

    • requestSession

      public Future<org.apache.hc.core5.reactor.IOSession> requestSession(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.util.Timeout timeout, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)
    • connect

      public Future<org.apache.hc.core5.reactor.IOSession> connect(org.apache.hc.core5.net.NamedEndpoint remoteEndpoint, SocketAddress remoteAddress, SocketAddress localAddress, org.apache.hc.core5.util.Timeout timeout, Object attachment, org.apache.hc.core5.concurrent.FutureCallback<org.apache.hc.core5.reactor.IOSession> callback)
      Specified by:
      connect in interface org.apache.hc.core5.reactor.ConnectionInitiator
    • execute

      protected void execute(org.apache.hc.core5.reactor.IOEventHandlerFactory ioEventHandlerFactory) throws IOException
      Throws:
      IOException
    • getStatus

      public org.apache.hc.core5.reactor.IOReactorStatus getStatus()
    • awaitShutdown

      public void awaitShutdown(org.apache.hc.core5.util.TimeValue waitTime) throws InterruptedException
      Throws:
      InterruptedException
    • initiateShutdown

      public void initiateShutdown()
    • shutdown

      public void shutdown(org.apache.hc.core5.util.TimeValue graceTime)
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception