Interface HttpChannel

All Superinterfaces:
AutoCloseable, Closeable, CloseableChannel

public interface HttpChannel extends CloseableChannel
  • Method Details

    • sendResponse

      void sendResponse(HttpResponse response, ActionListener<Void> listener)
      Sends an http response to the channel. The listener will be executed once the send process has been completed.
      Parameters:
      response - to send to channel
      listener - to execute upon send completion. Note that this listener is usually completed on a network thread in a context in which there's a risk of stack overflows if on close it calls back into the network layer in a manner that might end up nesting too deeply. When in doubt, dispatch any further work onto a separate thread.
    • getLocalAddress

      InetSocketAddress getLocalAddress()
      Returns the local address for this channel.
      Returns:
      the local address of this channel.
    • getRemoteAddress

      InetSocketAddress getRemoteAddress()
      Returns the remote address for this channel. Can be null if channel does not have a remote address.
      Returns:
      the remote address of this channel.