public class MessageRequest extends BaseRequest implements IMessageRequest
functionOptions, queryOptions, REQUEST_STATS_HEADER_VALUE_FORMAT_STRING
Constructor and Description |
---|
MessageRequest(java.lang.String requestUrl,
IBaseClient client,
java.util.List<? extends Option> requestOptions)
The request for the Message
|
MessageRequest(java.lang.String requestUrl,
IBaseClient client,
java.util.List<? extends Option> requestOptions,
java.lang.Class<? extends Message> responseClass)
The request for the Message
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Delete this item from the service
|
void |
delete(ICallback<Message> callback)
Delete this item from the service
|
IMessageRequest |
expand(java.lang.String value)
Sets the expand clause for the request
|
Message |
get()
Gets the Message from the service
|
void |
get(ICallback<Message> callback)
Gets the Message from the service
|
Message |
patch(Message sourceMessage)
Patches this Message with a source
|
void |
patch(Message sourceMessage,
ICallback<Message> callback)
Patches this Message with a source
|
Message |
post(Message newMessage)
Creates a Message with a new object
|
void |
post(Message newMessage,
ICallback<Message> callback)
Creates a Message with a new object
|
IMessageRequest |
select(java.lang.String value)
Sets the select clause for the request
|
addFunctionOption, addHeader, addQueryOption, getClient, getDelay, getFunctionOptions, getHeaders, getHttpMethod, getMaxRedirects, getMaxRetries, getOptions, getQueryOptions, getRequestUrl, getResponseType, getShouldRedirect, getShouldRetry, getUseCaches, send, send, setDelay, setHttpMethod, setMaxRedirects, setMaxRetries, setShouldRedirect, setShouldRetry, setUseCaches
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHeader, getDelay, getHeaders, getHttpMethod, getMaxRedirects, getMaxRetries, getOptions, getRequestUrl, getShouldRedirect, getShouldRetry, getUseCaches, setDelay, setMaxRedirects, setMaxRetries, setShouldRedirect, setShouldRetry, setUseCaches
public MessageRequest(java.lang.String requestUrl, IBaseClient client, java.util.List<? extends Option> requestOptions, java.lang.Class<? extends Message> responseClass)
requestUrl
- the request URLclient
- the service clientrequestOptions
- the options for this requestresponseClass
- the class of the responsepublic MessageRequest(java.lang.String requestUrl, IBaseClient client, java.util.List<? extends Option> requestOptions)
requestUrl
- the request URLclient
- the service clientrequestOptions
- the options for this requestpublic void get(ICallback<Message> callback)
get
in interface IMessageRequest
callback
- the callback to be called after success or failurepublic Message get() throws ClientException
get
in interface IMessageRequest
ClientException
- this exception occurs if the request was unable to complete for any reasonpublic void delete(ICallback<Message> callback)
delete
in interface IMessageRequest
callback
- the callback when the deletion action has completedpublic void delete() throws ClientException
delete
in interface IMessageRequest
ClientException
- if there was an exception during the delete operationpublic void patch(Message sourceMessage, ICallback<Message> callback)
patch
in interface IMessageRequest
sourceMessage
- the source object with updatescallback
- the callback to be called after success or failurepublic Message patch(Message sourceMessage) throws ClientException
patch
in interface IMessageRequest
sourceMessage
- the source object with updatesClientException
- this exception occurs if the request was unable to complete for any reasonpublic void post(Message newMessage, ICallback<Message> callback)
post
in interface IMessageRequest
newMessage
- the new object to createcallback
- the callback to be called after success or failurepublic Message post(Message newMessage) throws ClientException
post
in interface IMessageRequest
newMessage
- the new object to createClientException
- this exception occurs if the request was unable to complete for any reasonpublic IMessageRequest select(java.lang.String value)
select
in interface IMessageRequest
value
- the select clausepublic IMessageRequest expand(java.lang.String value)
expand
in interface IMessageRequest
value
- the expand clause