Package com.luciad.io.transport
Class TLcdTransportRequest
java.lang.Object
com.luciad.io.transport.TLcdTransportRequest
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 Summary
ConstructorDescriptionTLcdTransportRequest
(List<TLcdTransportAccessPoint> aAccessPoints, List<TLcdPair<String, String>> aHeaders, ReadableByteChannel aContent, String aContentType, long aContentLength) Creates a new request. -
Method Summary
Modifier and TypeMethodDescriptionGets the channel providing access to this request's content.long
Gets the content length of this request's content.Gets the content type of this request's content.Gets headers to add to this request.Gets the transport access points of this request.toString()
-
Constructor Details
-
TLcdTransportRequest
public TLcdTransportRequest(List<TLcdTransportAccessPoint> aAccessPoints, List<TLcdPair<String, String>> aHeaders, ReadableByteChannel aContent, String aContentType, long aContentLength) Creates a new request. Theheaders
parameter should not contain the content-type header nor the content-length header, which are specified viaaContentType
andaContentLength
.- Parameters:
aAccessPoints
- the access pointsaHeaders
- the headersaContent
- the contentaContentType
- the content typeaContentLength
- 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
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
Gets the content type of this request's content. The content type must match the data provided bygetContent()
.- Returns:
- the content type, or
null
if unspecified
-
getContent
Gets the channel providing access to this request's content.- Returns:
- the channel, or
null
if no content
-
getHeaders
Gets headers to add to this request. The returned list may contain pairs with the same key, which is why it is aList
of Pairs rather than aMap
. Note that this must not include the content-type header nor the content-length header, which are specified viagetContentType()
andgetContentLength()
.- Returns:
- the headers, may be empty but not
null
-
toString
-