An entity that can be sent or received with an HTTP message. Entities can be found in some {@link HttpEntityEnclosingRequest requests} and in{@link HttpResponse responses}, where they are optional.
In some places, the JavaDoc distinguishes three kinds of entities, depending on where their {@link #getContent content} originates:
- streamed: The content is received from a stream, or generated on the fly. In particular, this category includes entities being received from a {@link HttpConnection connection}. {@link #isStreaming Streamed} entities are generally not{@link #isRepeatable repeatable}.
- self-contained: The content is in memory or obtained by means that are independent from a connection or other entity. Self-contained entities are generally {@link #isRepeatable repeatable}.
- wrapping: The content is obtained from another entity.
This distinction is important for connection management with incoming entities. For entities that are created by an application and only sent using the HTTP components framework, the difference between streamed and self-contained is of little importance. In that case, it is suggested to consider non-repeatable entities as streamed, and those that are repeatable (without a huge effort) as self-contained.
@author
Oleg Kalnichevski
@version $Revision: 496070 $
@since 4.0