Class ContentSourceRequestContent

java.lang.Object
org.eclipse.jetty.client.ContentSourceRequestContent
All Implemented Interfaces:
Request.Content, org.eclipse.jetty.io.Content.Source

public class ContentSourceRequestContent extends Object implements Request.Content
A Request.Content that wraps a Content.Source.
  • Constructor Details

    • ContentSourceRequestContent

      public ContentSourceRequestContent(org.eclipse.jetty.io.Content.Source source)
    • ContentSourceRequestContent

      public ContentSourceRequestContent(org.eclipse.jetty.io.Content.Source source, String contentType)
  • Method Details

    • getContentSource

      public org.eclipse.jetty.io.Content.Source getContentSource()
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface Request.Content
      Returns:
      the value of the Content-Type header for the request content, such as text/html;charset=utf-8 or application/json, or null to use the value from HttpClient.getDefaultRequestContentType()
    • getLength

      public long getLength()
      Specified by:
      getLength in interface org.eclipse.jetty.io.Content.Source
    • read

      public org.eclipse.jetty.io.Content.Chunk read()
      Specified by:
      read in interface org.eclipse.jetty.io.Content.Source
    • demand

      public void demand(Runnable demandCallback)
      Specified by:
      demand in interface org.eclipse.jetty.io.Content.Source
    • fail

      public void fail(Throwable failure)
      Specified by:
      fail in interface org.eclipse.jetty.io.Content.Source
    • fail

      public void fail(Throwable failure, boolean last)
      Specified by:
      fail in interface org.eclipse.jetty.io.Content.Source
    • rewind

      public boolean rewind()
      Specified by:
      rewind in interface org.eclipse.jetty.io.Content.Source