com.novell.zos.grid
Interface ClientAgent


public interface ClientAgent

API for client communication with server for job and datagrid operations. This includes retrieving information about available jobs, to start jobs and to manage running jobs.


Method Summary
 void addAgentListener(AgentListener listener)
          Add listener for message handling.
 void cancelJob(String jobID)
          Cancel the referenced job.
 void cancelJob(String jobID, String reason)
          Cancel the referenced job with a reason string.
 boolean cat(String path, OutputStream out)
          Write the contents of a datagrid file to a supplied OutputStream.
 void changePassword(Credential newCredential)
          Deprecated. This method no longer works in the new session based message comms environment. The old credential is no longer stored on the local disc, and must be supplied in the request message over an encrypted message connection. Use ClientAgent.changePassword(Credential,Credential) instead.
 void changePassword(Credential oldCredential, Credential newCredential)
          Change the user password.
 void changePriority(String jobID, int priority)
          Change the priority of the referenced job.
 void copy(String src, String dest, boolean recursive)
          Copies files or directories into and out of the datagrid.
 void dataGridCancel()
          Cancel datagrid operations executing on behalf of the client.
 void delete(String path, boolean recursive)
          Delete files or directories in the datagrid.
 GridFile[] dir(String path)
          List files or directories in the datagrid.
 void disconnect()
          Logout an agent.
 void failJob(String jobID)
          Fail the referenced job
 void failJob(String jobID, String reason)
          Fail the referenced job with a a reason
 void follow(String path, OutputStream out, OutputStream err, String watchJob, Long maxUnch, Long offset, Long count, Long interval, Long refresh, Long timeout, boolean offsetLines, boolean retry, boolean quiet, boolean byName, boolean countLines)
          Output and/or follow the contents of a grid file in real time.
 String[] getAvailableJobs()
          Retrieve all the available jobs to run for the user.
 Credential getCredential()
          Get current credentials used for Server communication.
 String getGridName()
          Get the grid name that we are currently logged into.
 GridObjectInfo getGridObjectInfo(String gridObjectType, String gridObjectName)
          Return the grid object for a given name and type.
 String[] getGridObjectNames(String objectType, Constraint constraint)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 String[] getGridObjectNames(String objectType, Constraint constraint, String[] rankBy)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 String[] getGridObjectNames(String objectType, String constraintStr)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 String[] getGridObjectNames(String objectType, String constraintStr, String[] rankBy)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 GridObjectInfo[] getGridObjects(String objectType, Constraint constraint, boolean detail)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 GridObjectInfo[] getGridObjects(String objectType, Constraint constraint, boolean detail, String[] rankBy)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 GridObjectInfo[] getGridObjects(String objectType, String constraintStr, boolean detail)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 GridObjectInfo[] getGridObjects(String objectType, String constraintStr, boolean detail, String[] rankBy)
          Return a list of the names of all matching grid objects of the requested type that match the constraints.
 JobInfo getJobInfo(String jobName)
           
 void getMessages(String jobID)
          Inform server that this client is interested in receiving messages for a givenJob instance ID.
 WorkflowInfo[] getRunningJobs(boolean allJobs, boolean activeOnly, String parentWorkflowId, long submitTime, int maxCount, boolean detail)
          Get a array of job information for currently running jobs.
 int getStatus(String jobID)
          Get a simple status of the job.
 WorkflowInfo getStatusDetail(String jobID, boolean includeJoblets)
          Get detailed status information of the started job.
 GridFile gridFile(String gridFileName)
          Create an abstract Grid path object from a Data Grid URL string.
 void login()
          Login using the last (cached) credentials stored on host.
 void login(Credential credential)
          Login to a server using supplied credentials.
 void logout()
          Logout an agent.
 void logoutAndDestroyCredential()
          Logout an agent and removed any cached credentials from the host.
 void mkdir(String dir, boolean parents)
          Create directories in the datagrid.
 void move(String src, String dest)
          Move files or directories in the datagrid
 void pauseJob(String jobID)
          Pause the referenced job.
 void removeAgentListener(AgentListener listener)
          Remove listener for message handling.
 void resumeJob(String jobID)
          Resume the referenced job.
 String runJob(String deployedJobName, Map params)
          Runs the named job.
 String runJob(String deployedJobName, String jobInstanceName, Map jobArgs, int priority, long startTime, Map env, String policyText, String policyName, TypedConstraint constraint, boolean tracing)
          Runs the named job.
 void sendEvent(String jobID, String name, Map params)
          Send a custom event to a running job instance.
 void sendEventAsync(String jobID, String name, Map params)
          Send a custom event to a running job instance but don't wait for ACK.
 void setDebug(boolean debug)
          Set the debug log level of the agent
 void setFact(String gridObjectType, String gridObjectName, String factName, int factType, Object value)
          Set the value of the fact for a given grid object name and type.
 void setSyncListener(boolean syncListener)
          Set the mode of operation for message listeners on this agent.
 void setVerbose(boolean verbose)
          Set the verbose log level of the agent
 void shutdown()
          Shutdown an agent.
 void stopMessages(String jobID)
          Cancel a previous getMessages request.
 void uploadEnv(Map envMap)
          Update the persisted user environment on the server.
 

Method Detail

login

void login()
           throws GridAuthenticationException,
                  GridException
Login using the last (cached) credentials stored on host.

Throws:
GridAuthenticiationException - if login is invalid
GridException - if any other error occurs
GridAuthenticationException

login

void login(Credential credential)
           throws GridAuthenticationException,
                  GridException
Login to a server using supplied credentials.

Parameters:
credential - the user's credentials
Throws:
GridAuthenticiationException - if login is invalid
GridException - if any other error occurs
GridAuthenticationException

disconnect

void disconnect()
                throws GridException
Logout an agent. This will send a logout message and wait for response. After which, if using the TcpTransport, the connection will be dropped.
Note: this does not cancel any listeners in the agent so if you are not going to exit your application, be sure to call shutdown().

Throws:
GridException - if any error occurs

logout

void logout()
            throws GridException
Logout an agent. This will send a logout message and wait for response. After which, if using the TcpTransport, the connection will be dropped.
Note: this does not cancel any listeners in the agent so if you are not going to exit your application, be sure to call shutdown().

Throws:
GridException - if any error occurs

getCredential

Credential getCredential()
Get current credentials used for Server communication.

Returns:
Session credentials that are valid for future communtication with the server. null if not logged in

shutdown

void shutdown()
              throws GridException
Shutdown an agent. This calls logout() and cancels any registered AgentListeners.

Throws:
GridException - if any error occurs

logoutAndDestroyCredential

void logoutAndDestroyCredential()
                                throws GridException
Logout an agent and removed any cached credentials from the host. This will send a logout message and wait for response. After which, if using the TcpTransport, the connection will be dropped.
Note: this does not cancel any listeners in the agent so if you are not going to exit your application, be sure to call shutdown().

Throws:
GridException - if any error occurs

getGridName

String getGridName()
Get the grid name that we are currently logged into. Valid only after login.

Returns:
the grid name

setDebug

void setDebug(boolean debug)
Set the debug log level of the agent

Parameters:
debug - set to true for debug logging to stderr

setVerbose

void setVerbose(boolean verbose)
Set the verbose log level of the agent

Parameters:
verbose - set to true for verbose logging to stdout and stderr if debugging is also enabled

addAgentListener

void addAgentListener(AgentListener listener)
Add listener for message handling.

Parameters:
listener - the agent listener implementation

removeAgentListener

void removeAgentListener(AgentListener listener)
Remove listener for message handling.

Parameters:
listener - the listener implementation to remove

setSyncListener

void setSyncListener(boolean syncListener)
Set the mode of operation for message listeners on this agent.

true (default) -- listener callbacks are performed synchronously on the same thread. There is a guarantee of message order however the handler must not callback into the agent or a deadlock will likely arise.

false -- listener callbacks are performed asynchronously each on a separate new thread. The threads are started in the message order but there is, of course no guarantee to processing order. These threads can call back into the agent to send new messages.


runJob

String runJob(String deployedJobName,
              Map params)
              throws GridException
Runs the named job. Defaults the job instance name to the deployed job name, the priority to the user priority, to not send the environment and any additional policy or constraint.

Parameters:
deployedJobName - the name of the job to run.
params - the set of name/value pairs used to set properties and satisfy job arguments in JDL.
Returns:
a job id used to refer to the job.
Throws:
GridException - if any error occurs.

runJob

String runJob(String deployedJobName,
              String jobInstanceName,
              Map jobArgs,
              int priority,
              long startTime,
              Map env,
              String policyText,
              String policyName,
              TypedConstraint constraint,
              boolean tracing)
              throws GridException
Runs the named job.

Parameters:
deployedJobName - the name of the job to run.
jobInstanceName - the name for this run of the job.
jobArgs - the set of name/value pairs used to set properties and satisfy job arguments in JDL.
priority - the priority of the job.
startTime - the time in the future for delayed job starts or <= 0 for immediate starts.
env - Map of user environment properties to propagate to nodes
policyText - the string representation of a policy to be placed on the job. Maybe null.
policyName - the Name of a deployed policy to be placed on the job. Maybe null.
constraint - the typed constraint to add to the job instance.
Returns:
a job id used to refer to the job.
Throws:
GridException - if any error occurs.

cancelJob

void cancelJob(String jobID,
               String reason)
               throws GridException
Cancel the referenced job with a reason string. The reason string will be stored in the job log and visible in console and portals.

Parameters:
jobID - the job ID of the job to cancel.
reason - Reason string message for cancelling job.
Throws:
GridException - if any error occurs.

cancelJob

void cancelJob(String jobID)
               throws GridException
Cancel the referenced job.

Parameters:
jobID - the job ID of the job to cancel.
Throws:
GridException - if any error occurs.

failJob

void failJob(String jobID,
             String reason)
             throws GridException
Fail the referenced job with a a reason

Parameters:
jobID - the job ID of the job to cancel.
reason - Reason string message for failing job
Throws:
GridException - if any error occurs.

failJob

void failJob(String jobID)
             throws GridException
Fail the referenced job

Parameters:
jobID - the job ID of the job to cancel.
Throws:
GridException - if any error occurs.

pauseJob

void pauseJob(String jobID)
              throws GridException
Pause the referenced job.

Parameters:
jobID - the job ID of the job to pause.
Throws:
GridException - if any error occurs.

resumeJob

void resumeJob(String jobID)
               throws GridException
Resume the referenced job.

Parameters:
jobID - the job ID of the job to resume.
Throws:
GridException - if any error occurs.

changePriority

void changePriority(String jobID,
                    int priority)
                    throws GridException
Change the priority of the referenced job.

Parameters:
jobID - the job ID of the job to reprioritize.
priority - the new priority.
Throws:
GridException - if any error occurs.

changePassword

void changePassword(Credential newCredential)
                    throws GridException
Deprecated. This method no longer works in the new session based message comms environment. The old credential is no longer stored on the local disc, and must be supplied in the request message over an encrypted message connection. Use ClientAgent.changePassword(Credential,Credential) instead.

Change the user password.

Parameters:
newCredential - the new Credential of the client.
Throws:
GridException - if any error occurs.

changePassword

void changePassword(Credential oldCredential,
                    Credential newCredential)
                    throws GridException
Change the user password.

Parameters:
oldCredential - The old Credential of the client.
newCredential - The new Credential of the client.
Throws:
GridException - if any error occurs.

uploadEnv

void uploadEnv(Map envMap)
               throws GridException
Update the persisted user environment on the server.

Parameters:
envMap - Map of user environment properties to propagate to nodes
Throws:
GridException - if any error occurs.

getStatus

int getStatus(String jobID)
              throws GridException
Get a simple status of the job.

Parameters:
jobID - the job ID of the job to reprioritize.
Returns:
0 to 100 is percent complete, -1 is incomplete.
Throws:
GridException - if any error occurs.

getStatusDetail

WorkflowInfo getStatusDetail(String jobID,
                             boolean includeJoblets)
                             throws GridException
Get detailed status information of the started job.

Parameters:
jobID - the job ID of the job to reprioritize.
includeJoblets - include joblets details in request
Returns:
a complex WorkflowInfo object.
Throws:
GridException - if any error occurs.

sendEvent

void sendEvent(String jobID,
               String name,
               Map params)
               throws GridException
Send a custom event to a running job instance.

Parameters:
jobID - JobID of running job
name - the (method) name of event to create
params - Parameters for the named event
Throws:
GridException - if any error occurs

sendEventAsync

void sendEventAsync(String jobID,
                    String name,
                    Map params)
Send a custom event to a running job instance but don't wait for ACK. Therefore no exception will be thrown. Note that the ACK will still be returned so a message listener may still be able to pick it up later.

Parameters:
jobID - JobID of running job
name - the (method) name of event to create
params - Parameters for the named event

getMessages

void getMessages(String jobID)
                 throws GridException
Inform server that this client is interested in receiving messages for a givenJob instance ID.

Parameters:
jobID - JobID of job to retrieve messages for
Throws:
GridException - if any error occurs

stopMessages

void stopMessages(String jobID)
                  throws GridException
Cancel a previous getMessages request.

Parameters:
jobID - JobID of job to retrieve messages for
Throws:
GridException - if any error occurs

getAvailableJobs

String[] getAvailableJobs()
                          throws GridException
Retrieve all the available jobs to run for the user.

Returns:
String array of job names
Throws:
GridException - if any error occurs

getRunningJobs

WorkflowInfo[] getRunningJobs(boolean allJobs,
                              boolean activeOnly,
                              String parentWorkflowId,
                              long submitTime,
                              int maxCount,
                              boolean detail)
                              throws GridException
Get a array of job information for currently running jobs. If detail if true the returned object will also contain detailed attributes and facts information.

Parameters:
allJobs - true to retrieve info on all running jobs. false for user only
activeOnly - true is only currently active jobs (not queued) should be returned.
parentWorkflowId - if not null, return jobs that are children of the specified jobid. Null will return root level jobs only.
submitTime - if not 0, jobs will be returned from the job history that were submitted on or after this time.
maxCount - limit the number of jobs returned to this number if submitTime is not equal to 0. I.e. jobs currently in the cache are always returned.
detail - true to get detailed information.
Returns:
Array of WorkflowInfo instances for currently running jobs.
Throws:
GridException - if any error occurs.

gridFile

GridFile gridFile(String gridFileName)
                  throws DataGridException,
                         IOException
Create an abstract Grid path object from a Data Grid URL string.

Creates an abstract GridFile object that can be manipulated and queried in a manner similar, but not identical to java.io.File.

This interface also provides the ease of use Data Grid functions copy(),cat(),delete(),dir(),follow(),mkdir(),move(),dataGridCancel() that encapsulate GridFile usage. For example, use copy() Note that the specified URL does not have to refer to a pre-existing file. However, the URL must be a correctly parseable Data Grid path.

Parameters:
gridFileName - The Data Grid file URL string to use as the path. (req)
Returns:
An abstract GridFile object representing the specified data grid path.
Throws:
MalformedURLException - Thrown if gridFileName cannot be parsed.
DataGridException - Thrown if a system or configuration error causes the creation of the handle to fail.
IOException - Thrown if an I/O or network error causes the creation of the handle to fail.

copy

void copy(String src,
          String dest,
          boolean recursive)
          throws GridException
Copies files or directories into and out of the datagrid.

Parameters:
src - Data Grid URL String or local file name
dest - Data Grid URL String or local file name
recursive - true to copy recursively from src to dest. Defaults to false
Throws:
GridException - if any error occurs.

dir

GridFile[] dir(String path)
               throws GridException
List files or directories in the datagrid.

Creates an array of th eabstract GridFile objects that can be manipulated and queried in a manner similar, but not identical to java.io.File.

Note that the supplied URL must refer to an existing directory or file.

Parameters:
path - on datagrid to list
Returns:
Array of GridFile instances. Can be empty if datagrid directory is empty.
Throws:
GridException - if any error occurs.

cat

boolean cat(String path,
            OutputStream out)
            throws GridException
Write the contents of a datagrid file to a supplied OutputStream.

Parameters:
path - of file on datagrid to read
Throws:
GridException - if any error occurs.

delete

void delete(String path,
            boolean recursive)
            throws GridException
Delete files or directories in the datagrid.

Parameters:
path - Data Grid URL String on the datagrid to delete
recursive - Indicate whether to delete recursively or not
Throws:
GridException - if any error occurs.

mkdir

void mkdir(String dir,
           boolean parents)
           throws GridException
Create directories in the datagrid.

Parameters:
dir - Datagrid URL String or local directory to create
parents - true to create all directories in path. defaults to false.
Throws:
GridException - if any error occurs.

move

void move(String src,
          String dest)
          throws GridException
Move files or directories in the datagrid

Parameters:
src - Data Grid URL String
dest - Data Grid URL String
Throws:
GridException - if any error occurs.

follow

void follow(String path,
            OutputStream out,
            OutputStream err,
            String watchJob,
            Long maxUnch,
            Long offset,
            Long count,
            Long interval,
            Long refresh,
            Long timeout,
            boolean offsetLines,
            boolean retry,
            boolean quiet,
            boolean byName,
            boolean countLines)
            throws GridException
Output and/or follow the contents of a grid file in real time.

This operation performs the same function as Linux 'tail'. It can display the first or last N lines of a file, and/or actively follow bytes or lines added to the end of a file.

Parameters:
path - Path to file on datagrid to list
out - The OutputStream to which normal output will be written.
err - The OutputStream to which error and status messages will be written.
watchJob - Optional Job ID to watch. Return immediately when the job completes.
maxUnch - The maximum number of intervals after which the file is reopened by name in case it has been deleted and recreated.
offset - The offset (lines or bytes, depending on lineMode) at which to start reading the file.
count - The maximum number of lines or bytes (depending on lineMode) to read and output to out
interval - The number of milliseconds between rechecks of the file.
refresh - The request refresh period, in milliseconds. To avoid dead 'tail' sessions on the server, the client refreshes the request according to this interval.
timeout - The maximum number of milliseconds to wait when no bytes are received.
offsetLines - If true, then offset is computed as lines of text, with either CRLF or LF counting as a line separator. Otherwise, the offset is computed as 8 bit bytes.
retry - If true, and the remote file does not yet exist, then the remote file watcher thread will keep trying until the file appears.
quiet - If true, Then the remote file watcher will not send warnings or informational messages over the "error" channel.
byName - if true, then the remote file is "followed by name". That is, each test of the file checks whether the file has been deleted and/or replaced with a new file. This follows the semantics of the 'tail --follow=name' option for the Linux version of the 'tail' program.
countLines - If true then count is given in lines instead of bytes.
Throws:
GridException

dataGridCancel

void dataGridCancel()
                    throws GridException
Cancel datagrid operations executing on behalf of the client. For example, used to cancel follow() operations which are running in a separate thread.

Throws:
GridException - if error occurs in cancelling

getGridObjectNames

String[] getGridObjectNames(String objectType,
                            String constraintStr)
                            throws GridAuthenticationException,
                                   GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints. The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Parameters:
objectType - the Grid Object type to search for
constraintStr - the string representation of the constraint to be used in the search.
Returns:
An array of all matching grid object names or null if none match
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjectNames

String[] getGridObjectNames(String objectType,
                            Constraint constraint)
                            throws GridAuthenticationException,
                                   GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints. The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Parameters:
objectType - the Grid Object type to search for
constraint - the constraint to be used in the search.
Returns:
An array of all matching grid object names or null if none match
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjectNames

String[] getGridObjectNames(String objectType,
                            String constraintStr,
                            String[] rankBy)
                            throws GridAuthenticationException,
                                   GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints. The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Ordering is specified as an array of strings with each element in the form "<factname>/<ascending|descending". The ascending/decending order may be shortened to 'a|d'.

Parameters:
objectType - the Grid Object type to search for
constraintStr - the string representation of the constraint to be used in the search.
rankBy - the specification used to order the returned array or null for don't care
Returns:
An array of all matching grid object names or null if none match
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjectNames

String[] getGridObjectNames(String objectType,
                            Constraint constraint,
                            String[] rankBy)
                            throws GridAuthenticationException,
                                   GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints. The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Ordering is specified as an array of strings with each element in the form "<factname>/<ascending|descending". The ascending/decending order may be shortened to 'a|d'.

Parameters:
objectType - the Grid Object type to search for
constraint - the constraint to be used in the search.
rankBy - the specification used to order the returned array or null for don't care
Returns:
An array of all matching grid object names or null if none match
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjects

GridObjectInfo[] getGridObjects(String objectType,
                                String constraintStr,
                                boolean detail)
                                throws GridAuthenticationException,
                                       GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints.

The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Parameters:
objectType - the Grid Object type to search for
constraintStr - the string representation of the constraint to be used in the search.
detail - true if the full set of facts is required, false if only the basic set is required.
Returns:
An array of all matching grid objects or null if none match
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjects

GridObjectInfo[] getGridObjects(String objectType,
                                Constraint constraint,
                                boolean detail)
                                throws GridAuthenticationException,
                                       GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints.

The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Parameters:
objectType - the Grid Object type to search for
constraint - the constraint to be used in the search.
detail - true if the full set of facts is required, false if only the basic set is required.
Returns:
An array of all matching grid objects or null if none match
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjects

GridObjectInfo[] getGridObjects(String objectType,
                                String constraintStr,
                                boolean detail,
                                String[] rankBy)
                                throws GridAuthenticationException,
                                       GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints.

The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Ordering is specified as an array of strings with each element in the form "<factname>/<ascending|descending". The ascending/decending order may be shortened to 'a|d'.

Parameters:
objectType - the Grid Object type to search for
constraintStr - the string representation of the constraint to be used in the search.
detail - true if the full set of facts is required, false if only the basic set is required.
rankBy - the specification used to order the returned array or null for don't care
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjects

GridObjectInfo[] getGridObjects(String objectType,
                                Constraint constraint,
                                boolean detail,
                                String[] rankBy)
                                throws GridAuthenticationException,
                                       GridException
Return a list of the names of all matching grid objects of the requested type that match the constraints. The constraint is expected to only contain facts that relate to the object being searched. Other supplied constraints (if otherwise valid) will always evaluate to false and thus will always result in no matches.

Ordering is specified as an array of strings with each element in the form "<factname>/<ascending|descending". The ascending/decending order may be shortened to 'a|d'.

Parameters:
constraint - the constraint to be used in the search.
objectType - the Grid Object type to search for
detail - true if the full set of facts is required, false if only the basic set is required.
rankBy - the specification used to order the returned array or null for don't care
Returns:
An array of all matching grid objects or null if none match
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridException - if any error occurs such as an illegal constraint

getGridObjectInfo

GridObjectInfo getGridObjectInfo(String gridObjectType,
                                 String gridObjectName)
                                 throws GridAuthenticationException,
                                        GridObjectNotFoundException,
                                        GridException
Return the grid object for a given name and type.

Parameters:
gridObjectType - the type of the grid object
gridObjectName - the name of the grid object
Returns:
A representation of the job object
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridObjectNotFoundException - if the object cannot be found
GridException - if any error occurs

getJobInfo

JobInfo getJobInfo(String jobName)
                   throws GridException
Throws:
GridException

setFact

void setFact(String gridObjectType,
             String gridObjectName,
             String factName,
             int factType,
             Object value)
             throws GridAuthenticationException,
                    GridObjectNotFoundException,
                    GridException
Set the value of the fact for a given grid object name and type.

Parameters:
gridObjectType - the type of the grid object
gridObjectName - the name of the grid object
factName - Name of fact to set
factType - Fact value type to set
value - Fact value to set
Throws:
GridAuthenticationException - is the supplied credentials are invalid or do no permit the operation.
GridObjectNotFoundException - if the object cannot be found
GridException - if any error occurs


Copyright 2008 Novell, Inc. All Rights Reserved.