Interface HttpChannel

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
NettyHttpChannel

public interface HttpChannel extends AutoCloseable
A http channel represented in the most basic form. The channel only provides basic information about the connection to the client and allows to close it.
Since:
4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the host and port of the client which is connected to the server.
    void
    Closes the underlying connection of the client to the server.
    Get the host and port of the server binding the client is connected to.
  • Method Details

    • serverAddress

      @NonNull @NonNull HostAndPort serverAddress()
      Get the host and port of the server binding the client is connected to.
      Returns:
      the host and port of the server.
    • clientAddress

      @NonNull @NonNull HostAndPort clientAddress()
      Get the host and port of the client which is connected to the server.
      Returns:
      the host and port of the client.
    • close

      void close()
      Closes the underlying connection of the client to the server. After the close this channel cannot be used anymore.
      Specified by:
      close in interface AutoCloseable