R- the response type, i.e. the type of the object sent from the server back to the client.
public interface Request<R>
Every REST request should be a separate class implementing this interface. It should be instantiated for
an individual invocation, parameterised (usually directly via the constructor) and passed to
Objects of this type are therefore short-lived: They normally are only used for one single invocation and
forgotten afterwards. In most cases, anonymous instances are directly passed to the
CloudStoreRestClient.execute(...) method as shown in this example:
return getCloudStoreRestClient().execute(new DoThisAndThatOnServer(param1, param2));
Implementations of this interface are not thread-safe.
Important: Please do not directly implement this interface! If the REST request queries a
response from the server, it is recommended to sub-class
AbstractRequest. If there is no response,
implementors should sub-class
|Modifier and Type||Method and Description|
Execute the actual request.
Indicates, if the result of the invocation can be
void setCloudStoreRestClient(CloudStoreRestClient cloudStoreRestClient)
CloudStoreRestClient. May be
Important: You should never invoke this method directly! Instead, pass the
null. Depending on
nullresult is considered an error and causes an exception.
If the server must send a response, i.e. the invocation must not return empty-handed, this
false. In case, the server still does not send a reply, it is considered an
error causing an exception.
Please note: If a request never returns a response (like a Java void method), it is recommended
that you sub-class
nullas response is allowed;
Copyright © 2013–2018. All rights reserved.