Interface Entity

All Known Subinterfaces:
Collector
All Known Implementing Classes:
RequestCollector

public interface Entity
The Entity object is used to represent the HTTP entity received from the client. The entity contains a header and body as well as the underlying Channel for the connection. If there is no body with the entity this will provide an empty body object which provides a zero length sequence of bytes.
  • Method Summary

    Modifier and Type
    Method
    Description
    This is used to acquire the body for this HTTP entity.
    This provides the connected channel for the client.
    This provides the HTTP request header for the entity.
    long
    This is the time in milliseconds when the request was first read from the underlying channel.
  • Method Details

    • getTime

      long getTime()
      This is the time in milliseconds when the request was first read from the underlying channel. The time represented here represents the time collection of this request began. This does not necessarily represent the time the bytes arrived on the receive buffers as some data may have been buffered.
      Returns:
      this represents the time the request was ready at
    • getBody

      Body getBody()
      This is used to acquire the body for this HTTP entity. This will return a body which can be used to read the content of the message, also if the request is multipart upload then all of the parts are provided as Part objects. Each part can then be read as an individual message.
      Returns:
      the body provided by the HTTP request message
    • getHeader

      Header getHeader()
      This provides the HTTP request header for the entity. This is always populated and provides the details sent by the client such as the target URI and the query if specified. Also this can be used to determine the method and protocol version used.
      Returns:
      the header provided by the HTTP request message
    • getChannel

      Channel getChannel()
      This provides the connected channel for the client. This is used to send and receive bytes to and from an transport layer. Each channel provided with an entity contains an attribute map which contains information about the connection.
      Returns:
      the connected channel for this HTTP entity