Class TLcdTransportRequest

java.lang.Object
com.luciad.io.transport.TLcdTransportRequest

public class TLcdTransportRequest extends Object
A request to a transport service. The request has one or more transport access points, with URI and HTTP method (GET/POST) information. If the request has a content body, it provides a content type and a channel for reading the content.
Since:
11.0
  • Constructor Details

    • TLcdTransportRequest

      public TLcdTransportRequest(List<TLcdTransportAccessPoint> aAccessPoints, List<TLcdPair<String,String>> aHeaders, ReadableByteChannel aContent, String aContentType, long aContentLength)
      Creates a new request.

      The headers parameter should not contain the content-type header nor the content-length header, which are specified via aContentType and aContentLength.

      Parameters:
      aAccessPoints - the access points
      aHeaders - the headers
      aContent - the content
      aContentType - the content type
      aContentLength - the content length
  • Method Details

    • getContentLength

      public long getContentLength()
      Gets the content length of this request's content.
      Returns:
      the content length, or -1 if unspecified
    • getTransportAccessPoints

      public List<TLcdTransportAccessPoint> getTransportAccessPoints()
      Gets the transport access points of this request. There must be at least one transport access point provided. It provides the URI and the HTTP method for the request. When no HTTP method is specified, a default method should be used.
      Returns:
      list of transport access points, in order of preference, must not be empty or null
    • getContentType

      public String getContentType()
      Gets the content type of this request's content. The content type must match the data provided by getContent().
      Returns:
      the content type, or null if unspecified
    • getContent

      public ReadableByteChannel getContent()
      Gets the channel providing access to this request's content.
      Returns:
      the channel, or null if no content
    • getHeaders

      public List<TLcdPair<String,String>> getHeaders()
      Gets headers to add to this request. The returned list may contain pairs with the same key, which is why it is a List of Pairs rather than a Map. Note that this must not include the content-type header nor the content-length header, which are specified via getContentType() and getContentLength().
      Returns:
      the headers, may be empty but not null
    • toString

      public String toString()
      Overrides:
      toString in class Object