public class ServiceRequest extends APIBean
| Constructor and Description |
|---|
ServiceRequest()
Default constructor.
|
ServiceRequest(java.lang.String content,
ServiceToken serviceToken)
Convenience constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceRequestParameter[] |
getBodyParameters()
Gets the body parameters of the request.
|
java.lang.String |
getContent()
Returns the content
|
IServiceContentEncoding |
getContentEncoding()
Returns the content encoding
|
int |
getContentLength()
Returns the content length
|
java.lang.String |
getContentType()
Returns the content type
|
ServiceRequestParameter[] |
getQueryParameters()
Gets the query parameters of the request.
|
java.lang.String |
getRefererHost()
Returns the referer host (origin) of the request.
|
ServiceHeader[] |
getServiceHeaders()
Returns the array of ServiceHeader
|
ServiceSession |
getServiceSession()
Getter for service session
|
ServiceToken |
getServiceToken()
Gets the ServiceToken of the request.
|
java.lang.String |
getUserAgent()
Gets the overridden user-agent string.
|
void |
setBodyParameters(ServiceRequestParameter[] bodyParameters)
Sets the body parameters of the request.
|
void |
setContent(java.lang.String content)
Set the content
|
void |
setContentEncoding(IServiceContentEncoding contentEncoding)
Set the content encoding
|
void |
setContentLength(int contentLength)
Set the content length
|
void |
setContentType(java.lang.String contentType)
Set the content type
|
void |
setQueryParameters(ServiceRequestParameter[] queryParameters)
Sets the query parameters of the request.
|
void |
setRefererHost(java.lang.String refererHost)
Sets the value for the referer host of the request.
|
void |
setServiceHeaders(ServiceHeader[] serviceHeaders)
Set the array of ServiceHeader
|
void |
setServiceSession(ServiceSession serviceSession)
Setter for service session
|
void |
setServiceToken(ServiceToken serviceToken)
Sets the ServiceToken of the request.
|
void |
setUserAgent(java.lang.String userAgent)
Sets the user-agent to override the default user-agent string.
|
public ServiceRequest()
public ServiceRequest(java.lang.String content,
ServiceToken serviceToken)
content - Content payload.serviceToken - ServiceToken for the request.public IServiceContentEncoding getContentEncoding()
public void setContentEncoding(IServiceContentEncoding contentEncoding)
contentEncoding - Encoding of the binary payload - by default assumed to be UTF8.public ServiceRequestParameter[] getBodyParameters()
public void setBodyParameters(ServiceRequestParameter[] bodyParameters)
bodyParameters - ServiceRequestParameter array or null if none are specified.public java.lang.String getContent()
public void setContent(java.lang.String content)
content - Request/Response data content (plain text)public int getContentLength()
public void setContentLength(int contentLength)
contentLength - The length in bytes for the Content field.public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType - The request/response content type (MIME TYPE).public ServiceRequestParameter[] getQueryParameters()
public void setQueryParameters(ServiceRequestParameter[] queryParameters)
queryParameters - ServiceRequestParameter array or null if none are specified.public java.lang.String getRefererHost()
public void setRefererHost(java.lang.String refererHost)
refererHost - Referer host of the requestpublic ServiceHeader[] getServiceHeaders()
public void setServiceHeaders(ServiceHeader[] serviceHeaders)
serviceHeaders - The serviceHeaders array (name,value pairs) to be included on the I/O service request.public ServiceSession getServiceSession()
public void setServiceSession(ServiceSession serviceSession)
serviceSession - The element service sessionpublic ServiceToken getServiceToken()
public void setServiceToken(ServiceToken serviceToken)
serviceToken - ServiceToken to be used for the invocation.public java.lang.String getUserAgent()
public void setUserAgent(java.lang.String userAgent)
userAgent - User-agent string.