Class HttpChannel

All Implemented Interfaces:
Direct Known Subclasses:
HttpChannelOverFCGI, HttpChannelOverHTTP, HttpChannelOverHTTP2, HttpChannelOverHTTP3

public abstract class HttpChannel extends Object implements CyclicTimeouts.Expirable
  • Constructor Details

  • Method Details

    • destroy

      public void destroy()
    • getHttpDestination

      public HttpDestination getHttpDestination()
    • associate

      public boolean associate(HttpExchange exchange)

      Associates the given exchange to this channel in order to be sent over the network.

      If the association is successful, the exchange can be sent. Otherwise, the channel must be disposed because whoever terminated the exchange did not do it - it did not have the channel yet.

      exchange - the exchange to associate
      true if the association was successful, false otherwise
    • disassociate

      public boolean disassociate(HttpExchange exchange)
    • getHttpExchange

      public HttpExchange getHttpExchange()
    • getExpireNanoTime

      public long getExpireNanoTime()
      Description copied from interface: CyclicTimeouts.Expirable

      Returns the expiration time in nanoseconds.

      The value to return must be calculated taking into account the current nanoTime, for example:

      expireNanoTime = + timeoutNanos

      Returning Long.MAX_VALUE indicates that this entity does not expire.

      Specified by:
      getExpireNanoTime in interface CyclicTimeouts.Expirable
      the expiration time in nanoseconds, or Long.MAX_VALUE if this entity does not expire
    • getHttpSender

      protected abstract HttpSender getHttpSender()
    • getHttpReceiver

      protected abstract HttpReceiver getHttpReceiver()
    • send

      public void send()
    • send

      public abstract void send(HttpExchange exchange)
    • release

      public abstract void release()
    • proceed

      public void proceed(HttpExchange exchange, Throwable failure)
    • abort

      public boolean abort(HttpExchange exchange, Throwable requestFailure, Throwable responseFailure)
    • abortResponse

      public boolean abortResponse(HttpExchange exchange, Throwable failure)
    • exchangeTerminating

      public Result exchangeTerminating(HttpExchange exchange, Result result)
    • exchangeTerminated

      public void exchangeTerminated(HttpExchange exchange, Result result)
    • toString

      public String toString()
      toString in class Object