public static class SyncTask.Builder<R extends SyncTask.Request> extends Object
SyncTask.| Constructor and Description |
|---|
Builder(int taskId)
Creates a new instance of Builder for the specified synchronization taskId.
|
| Modifier and Type | Method and Description |
|---|---|
SyncTask<R> |
build()
Builds a new instance of SyncTask.
|
SyncTask.Builder |
request(R request)
Specifies a request for the synchronization task to build.
|
public Builder(int taskId)
taskId - Id of the synchronization task to build.public SyncTask.Builder request(@Nullable R request)
request - The desired request. This should be a simple POJO object that can be processed
by Gson. May be null if request is not necessary for the
sync task.