com.mindoo.remote.api.jobs
Interface IRemoteNotesBGAgentJob

All Superinterfaces:
IRemoteJob

public interface IRemoteNotesBGAgentJob
extends IRemoteJob

Interface of a background job that executes a Notes agent by calling lotus.domino.Agent.run().
The agent code cannot directly access NotesUIWorkspace, because it is running in the background, but it may create a Remote API connection and use UI methods to modify the Client UI


Method Summary
 boolean cancel()
          Stops the job.
 java.lang.String getContextDocUrl()
          Method to read the URL of the context document that is passed to the agent code and can be used to exchange values
 java.lang.String getName()
          Returns the human readable name of this job.
 void schedule(long delay)
          Schedules this job to be run after a specified delay.
 void setName(java.lang.String name)
          Changes the name of this job.
 
Methods inherited from interface com.mindoo.remote.api.jobs.IRemoteJob
isSystem, isUser, schedule, setProperty, setSystem, setUser
 

Method Detail

setName

void setName(java.lang.String name)
             throws RemoteEclipseAPIException
Changes the name of this job. If the job is currently running, waiting, or sleeping, the new job name may not take effect until the next time the job is scheduled.

The job name is a human-readable value that is displayed to users. The name does not need to be unique, but it must not be null.

Parameters:
name - the name of the job.
Throws:
RemoteEclipseAPIException

schedule

void schedule(long delay)
              throws RemoteEclipseAPIException
Schedules this job to be run after a specified delay. The job is put in the SLEEPING state until the specified delay has elapsed, after which the job is added to a queue of WAITING jobs. Once the job arrives at the beginning of the queue, it will be run at the first available opportunity.

Jobs of equal priority and delay with conflicting scheduling rules are guaranteed to run in the order they are scheduled. No guarantees are made about the relative execution order of jobs with unrelated or null scheduling rules, or different priorities.

If this job is currently running, it will be rescheduled with the specified delay as soon as it finishes. If this method is called multiple times while the job is running, the job will still only be rescheduled once, with the most recent delay value that was provided.

Scheduling a job that is waiting or sleeping has no effect.

Parameters:
delay - a time delay in milliseconds before the job should run
Throws:
RemoteEclipseAPIException

cancel

boolean cancel()
               throws RemoteEclipseAPIException
Stops the job. If the job is currently waiting, it will be removed from the queue. If the job is sleeping, it will be discarded without having a chance to resume and its sleeping state will be cleared. If the job is currently executing, it will be asked to stop but there is no guarantee that it will do so.

Returns:
Throws:
RemoteEclipseAPIException

getName

java.lang.String getName()
                         throws RemoteEclipseAPIException
Returns the human readable name of this job. The name is never null.

Returns:
the name of this job
Throws:
RemoteEclipseAPIException

getContextDocUrl

java.lang.String getContextDocUrl()
                                  throws RemoteEclipseAPIException
Method to read the URL of the context document that is passed to the agent code and can be used to exchange values

Returns:
Notes URL
Throws:
RemoteEclipseAPIException