public class TaskApiClient extends Object
| Constructor and Description |
|---|
TaskApiClient(String endpoint)
Constructor.
|
TaskApiClient(String endpoint,
AuthenticationProvider authenticationProvider)
Constructor.
|
TaskApiClient(String endpoint,
String username,
String password)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
TaskType |
claimTask(String taskId)
Claims a task and returns the latest (updated) task instance.
|
TaskType |
completeTask(String taskId,
Map<String,String> taskData)
Completes a task and returns the latest (updated) task instance.
|
protected ClientRequest |
createClientRequest(String atomUrl)
Creates the RESTEasy client request object, configured appropriately.
|
TaskType |
failTask(String taskId,
Map<String,String> taskData)
Fails a task and returns the latest (updated) task instance.
|
FindTasksResponse |
findTasks(FindTasksRequest findTasksRequest)
Finds a list of tasks based on criteria provided in
FindTasksRequest. |
String |
getEndpoint() |
TaskType |
getTask(String taskId)
Gets a task by its unique id.
|
TaskType |
releaseTask(String taskId)
Releases a task and returns the latest (updated) task instance.
|
TaskType |
startTask(String taskId)
Starts a task and returns the latest (updated) task instance.
|
TaskType |
stopTask(String taskId)
Stops a task and returns the latest (updated) task instance.
|
public TaskApiClient(String endpoint)
endpoint - public TaskApiClient(String endpoint, String username, String password) throws TaskApiClientException
endpoint - username - password - TaskApiClientExceptionSrampAtomExceptionpublic TaskApiClient(String endpoint, AuthenticationProvider authenticationProvider) throws TaskApiClientException
endpoint - authenticationProvider - TaskApiClientExceptionSrampAtomExceptionpublic String getEndpoint()
public FindTasksResponse findTasks(FindTasksRequest findTasksRequest) throws TaskApiClientException
FindTasksRequest.findTasksRequest - TaskApiClientExceptionpublic TaskType getTask(String taskId) throws TaskApiClientException
TaskApiClientExceptionSrampAtomExceptionpublic TaskType claimTask(String taskId) throws TaskApiClientException
taskId - TaskApiClientExceptionpublic TaskType releaseTask(String taskId) throws TaskApiClientException
taskid - TaskApiClientExceptionpublic TaskType startTask(String taskId) throws TaskApiClientException
taskid - TaskApiClientExceptionpublic TaskType stopTask(String taskId) throws TaskApiClientException
taskid - TaskApiClientExceptionpublic TaskType completeTask(String taskId, Map<String,String> taskData) throws TaskApiClientException
taskid - TaskApiClientExceptionpublic TaskType failTask(String taskId, Map<String,String> taskData) throws TaskApiClientException
taskid - TaskApiClientExceptionprotected ClientRequest createClientRequest(String atomUrl)
atomUrl - Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.