Class HttpDestination

All Implemented Interfaces:
Closeable, AutoCloseable, Destination, Callback, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle, Invocable, Sweeper.Sweepable
Direct Known Subclasses:
MultiplexHttpDestination, PoolingHttpDestination

@ManagedObject @Deprecated(since="2021-05-27") public abstract class HttpDestination extends ContainerLifeCycle implements Destination, Closeable, Callback, Dumpable, Sweeper.Sweepable
Deprecated.
  • Constructor Details

    • HttpDestination

      public HttpDestination(HttpClient client, Origin origin)
      Deprecated.
  • Method Details

    • stale

      public boolean stale()
      Deprecated.
    • sweep

      public boolean sweep()
      Deprecated.
      Specified by:
      sweep in interface Sweeper.Sweepable
      Returns:
      whether this resource should be swept
    • isSecure

      public boolean isSecure()
      Deprecated.
    • getHttpClient

      public HttpClient getHttpClient()
      Deprecated.
    • getOrigin

      public Origin getOrigin()
      Deprecated.
    • getHttpExchanges

      public Queue<HttpExchange> getHttpExchanges()
      Deprecated.
    • getRequestNotifier

      public RequestNotifier getRequestNotifier()
      Deprecated.
    • getResponseNotifier

      public ResponseNotifier getResponseNotifier()
      Deprecated.
    • getProxy

      public ProxyConfiguration.Proxy getProxy()
      Deprecated.
    • getClientConnectionFactory

      public ClientConnectionFactory getClientConnectionFactory()
      Deprecated.
    • getScheme

      @ManagedAttribute(value="The destination scheme", readonly=true) public String getScheme()
      Deprecated.
      Specified by:
      getScheme in interface Destination
      Returns:
      the scheme of this destination, such as "http" or "https"
    • getHost

      @ManagedAttribute(value="The destination host", readonly=true) public String getHost()
      Deprecated.
      Specified by:
      getHost in interface Destination
      Returns:
      the host of this destination, such as "127.0.0.1" or "google.com"
    • getPort

      @ManagedAttribute(value="The destination port", readonly=true) public int getPort()
      Deprecated.
      Specified by:
      getPort in interface Destination
      Returns:
      the port of this destination such as 80 or 443
    • getQueuedRequestCount

      @ManagedAttribute(value="The number of queued requests", readonly=true) public int getQueuedRequestCount()
      Deprecated.
    • getConnectAddress

      public Origin.Address getConnectAddress()
      Deprecated.
    • getHostField

      public HttpField getHostField()
      Deprecated.
    • getConnectionPool

      @ManagedAttribute(value="The connection pool", readonly=true) public ConnectionPool getConnectionPool()
      Deprecated.
    • succeeded

      public void succeeded()
      Deprecated.
      Description copied from interface: Callback

      Callback invoked when the operation completes.

      Specified by:
      succeeded in interface Callback
      See Also:
    • failed

      public void failed(Throwable x)
      Deprecated.
      Description copied from interface: Callback

      Callback invoked when the operation fails.

      Specified by:
      failed in interface Callback
      Parameters:
      x - the reason for the operation failure
    • send

      public void send(Request request, Response.CompleteListener listener)
      Deprecated.
    • send

      public void send(HttpExchange exchange)
      Deprecated.
    • send

      public void send()
      Deprecated.
    • newConnection

      public void newConnection(Promise<Connection> promise)
      Deprecated.
      Description copied from interface: Destination
      Creates asynchronously a new, unpooled, Connection that will be returned at a later time through the given Promise.

      Use FuturePromise to wait for the connection:

       Destination destination = ...;
       FuturePromise<Connection> futureConnection = new FuturePromise<>();
       destination.newConnection(futureConnection);
       Connection connection = futureConnection.get(5, TimeUnit.SECONDS);
       
      Specified by:
      newConnection in interface Destination
      Parameters:
      promise - the promise of a new, unpooled, Connection
    • remove

      public boolean remove(HttpExchange exchange)
      Deprecated.
    • close

      public void close()
      Deprecated.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • release

      public void release(Connection connection)
      Deprecated.
    • remove

      public boolean remove(Connection connection)
      Deprecated.
    • close

      @Deprecated public void close(Connection connection)
      Deprecated.
      use remove(Connection) instead
      Parameters:
      connection - the connection to remove
    • abort

      public void abort(Throwable cause)
      Deprecated.
      Aborts all the HttpExchanges queued in this destination.
      Parameters:
      cause - the abort cause
    • dump

      public void dump(Appendable out, String indent) throws IOException
      Deprecated.
      Description copied from interface: Dumpable
      Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
      Specified by:
      dump in interface Dumpable
      Overrides:
      dump in class ContainerLifeCycle
      Parameters:
      out - The appendable to dump to
      indent - The indent to apply after any new lines.
      Throws:
      IOException - if unable to write to Appendable
    • asString

      public String asString()
      Deprecated.
    • getIdle

      @ManagedAttribute("For how long this destination has been idle in ms") public long getIdle()
      Deprecated.
    • isStale

      @ManagedAttribute("Whether this destinations is stale") public boolean isStale()
      Deprecated.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class AbstractLifeCycle