Class AbstractRequestContent

java.lang.Object
org.eclipse.jetty.client.util.AbstractRequestContent
All Implemented Interfaces:
Request.Content
Direct Known Subclasses:
ByteBufferRequestContent, BytesRequestContent, InputStreamRequestContent, MultiPartRequestContent, PathRequestContent

public abstract class AbstractRequestContent extends Object implements Request.Content

Partial implementation of Request.Content.

  • Constructor Details

    • AbstractRequestContent

      protected AbstractRequestContent(String contentType)
  • Method Details

    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface Request.Content
      Returns:
      the content type string such as "application/octet-stream" or "application/json;charset=UTF8", or null if no content type must be set
    • subscribe

      public Request.Content.Subscription subscribe(Request.Content.Consumer consumer, boolean emitInitialContent)
      Description copied from interface: Request.Content

      Initializes this content producer with the content consumer, and with the indication of whether initial content, if present, must be emitted upon the initial demand of content (to support delaying the send of the request content in case of Expect: 100-Continue when emitInitialContent is false).

      Specified by:
      subscribe in interface Request.Content
      Parameters:
      consumer - the content consumer to invoke when there is demand for content
      emitInitialContent - whether to emit initial content, if present
      Returns:
      the Subscription that links this producer to the consumer
    • newSubscription

      protected abstract Request.Content.Subscription newSubscription(Request.Content.Consumer consumer, boolean emitInitialContent)