public interface AddableResource<T>
| Modifier and Type | Method and Description |
|---|---|
TaskResource |
add(T resource,
RequestOption... options)
Adds a resource according to the provided
resource object. |
TaskResource add(T resource, RequestOption... options)
resource object.
Depending on the resource type, the add action can take some time to complete.
Therefore, you can specify a timeout using an implementation of RequestOption
called TaskTimeout. If no timeout is
specified, the default behavior is to wait until the add action completes.
The following example shows how to specify the timeout:
SomeClient client = oneViewClient.someClient();
SomeResource resource = new SomeResource();
TaskResource task = client.add(resource, TaskTimeout.of(5000)); //5 secs
resource - object containing the details of the resource that should be added.options - varargs of RequestOption, which can be used to specify
some request options.TaskResource task containing the result of this request.Copyright © 2016. All rights reserved.