public class TaskClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected LDAPConnection |
connection
Connection through which task scheduling will take place.
|
| Constructor and Description |
|---|
TaskClient(LDAPConnection conn)
Creates a new TaskClient for interacting with the task backend remotely.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelTask(String id)
Changes that the state of the task in the backend to a canceled state.
|
static ArrayList<RawAttribute> |
getTaskAttributes(TaskScheduleInformation information)
This is a commodity method that returns the common attributes (those
related to scheduling) of a task entry for a given
TaskScheduleInformation object. |
static String |
getTaskDN(List<RawAttribute> taskAttributes)
Returns the DN of the task entry for a given list of task attributes.
|
List<TaskEntry> |
getTaskEntries()
Gets all the ds-task entries from the task root.
|
TaskEntry |
getTaskEntry(String id)
Gets the entry of the task whose ID is
id from the directory. |
static String |
getTaskID(List<RawAttribute> taskAttributes)
Returns the ID of the task entry for a given list of task attributes.
|
TaskEntry |
schedule(TaskScheduleInformation information)
Schedule a task for execution by writing an entry to the task backend.
|
protected LDAPConnection connection
public TaskClient(LDAPConnection conn)
conn - for accessing the task backendpublic static String getTaskID(List<RawAttribute> taskAttributes)
taskAttributes - the task attributes.public static String getTaskDN(List<RawAttribute> taskAttributes)
taskAttributes - the task attributes.public static ArrayList<RawAttribute> getTaskAttributes(TaskScheduleInformation information)
TaskScheduleInformation object.information - the scheduling information.public TaskEntry schedule(TaskScheduleInformation information) throws LDAPException, IOException, org.forgerock.opendj.ldap.DecodeException, TaskClientException
information - to be scheduledIOException - if there is a stream communication problemLDAPException - if there is a problem getting information
out to the directoryorg.forgerock.opendj.ldap.DecodeException - if there is a problem with the encodingTaskClientException - if there is a problem with the task entrypublic List<TaskEntry> getTaskEntries() throws LDAPException, IOException, org.forgerock.opendj.ldap.DecodeException
IOException - if there is a stream communication problemLDAPException - if there is a problem getting information
out to the directoryorg.forgerock.opendj.ldap.DecodeException - if there is a problem with the encodingpublic TaskEntry getTaskEntry(String id) throws LDAPException, IOException, org.forgerock.opendj.ldap.DecodeException, TaskClientException
id from the directory.id - of the entry to retrieveIOException - if there is a stream communication problemLDAPException - if there is a problem getting information
out to the directoryorg.forgerock.opendj.ldap.DecodeException - if there is a problem with the encodingTaskClientException - if there is no task with the requested idpublic void cancelTask(String id) throws TaskClientException, IOException, org.forgerock.opendj.ldap.DecodeException, LDAPException
id - if the task to cancelIOException - if there is a stream communication problemLDAPException - if there is a problem getting information
out to the directoryorg.forgerock.opendj.ldap.DecodeException - if there is a problem with the encodingTaskClientException - if there is no task with the requested idCopyright © 2010-2015 ForgeRock AS. All Rights Reserved.