com.mindoo.remote.api.jobs
Interface IRemoteJob

All Known Subinterfaces:
IRemoteJavascriptJob, IRemoteMonitoringJob, IRemoteNotesBGAgentJob

public interface IRemoteJob

Base interface for a background job of the remote api. Does not directly wrap org.eclipse.core.runtime.jobs.Job (Online documentation) but has similar methods


Method Summary
 boolean isSystem()
          Returns whether this job is a system job.
 boolean isUser()
          Returns whether this job has been directly initiated by a UI end user.
 void schedule()
          Schedules this job to be run.
 void setProperty(IRemoteQualifiedName key, java.lang.Object value)
          Sets the value of the property of this job identified by the given key.
 void setSystem(boolean b)
          Sets whether or not this job is a system job.
 void setUser(boolean b)
          Sets whether or not this job has been directly initiated by a UI end user.
 

Method Detail

setProperty

void setProperty(IRemoteQualifiedName key,
                 java.lang.Object value)
                 throws RemoteEclipseAPIException
Sets the value of the property of this job identified by the given key. If the supplied value is null, the property is removed from this resource.

Properties are intended to be used as a caching mechanism by ISV plug-ins. They allow key-object associations to be stored with a job instance. These key-value associations are maintained in memory (at all times), and the information is never discarded automatically.

The qualifier part of the property name must be the unique identifier of the declaring plug-in (e.g. "com.example.plugin").

Parameters:
key - the qualified name of the property
value - the value of the property, or null if the property is to be removed
Throws:
RemoteEclipseAPIException

setUser

void setUser(boolean b)
             throws RemoteEclipseAPIException
Sets whether or not this job has been directly initiated by a UI end user. These jobs may be presented differently in the UI. This method must be called before the job is scheduled.

Parameters:
b - true if this job is a user-initiated job, and false otherwise.
Throws:
RemoteEclipseAPIException

setSystem

void setSystem(boolean b)
               throws RemoteEclipseAPIException
Sets whether or not this job is a system job. System jobs are typically not revealed to users in any UI presentation of jobs. Other than their UI presentation, system jobs act exactly like other jobs. If this value is not explicitly set, jobs are treated as non-system jobs. This method must be called before the job is scheduled.

Parameters:
b - true if this job should be a system job, and false otherwise.
Throws:
RemoteEclipseAPIException

schedule

void schedule()
              throws RemoteEclipseAPIException
Schedules this job to be run. The job is added to a queue of waiting jobs, and will be run when it arrives at the beginning of the queue.

Throws:
RemoteEclipseAPIException

isSystem

boolean isSystem()
                 throws RemoteEclipseAPIException
Returns whether this job is a system job. System jobs are typically not revealed to users in any UI presentation of jobs. Other than their UI presentation, system jobs act exactly like other jobs. If this value is not explicitly set, jobs are treated as non-system jobs. The default value is false.

Returns:
true if this job is a system job, and false otherwise.
Throws:
RemoteEclipseAPIException

isUser

boolean isUser()
               throws RemoteEclipseAPIException
Returns whether this job has been directly initiated by a UI end user. These jobs may be presented differently in the UI. The default value is false.

Returns:
true if this job is a user-initiated job, and false otherwise.
Throws:
RemoteEclipseAPIException