com.openexchange.admin.rmi.impl
Class OXTaskMgmtImpl

java.lang.Object
  extended by com.openexchange.admin.rmi.impl.OXCommonImpl
      extended by com.openexchange.admin.rmi.impl.OXTaskMgmtImpl
All Implemented Interfaces:
OXTaskMgmtInterface, java.rmi.Remote

public class OXTaskMgmtImpl
extends OXCommonImpl
implements OXTaskMgmtInterface


Field Summary
 
Fields inherited from interface com.openexchange.admin.rmi.OXTaskMgmtInterface
RMI_NAME
 
Constructor Summary
OXTaskMgmtImpl()
           
 
Method Summary
 void deleteJob(Context ctx, Credentials cred, int id)
          This method is used to delete finished jobs (jobs != running) from the list
 void flush(Context ctx, Credentials cred)
          Flushes all jobs from the queue which are finished ( != running)
 java.lang.String getJobList(Context ctx, Credentials cred)
           
 java.lang.Object getTaskResults(Context ctx, Credentials cred, int id)
          Gets the result from the task with the specified id
 java.lang.Object getTaskResults(int id)
           
 boolean isTaskDone(int id)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXTaskMgmtImpl

public OXTaskMgmtImpl()
               throws StorageException
Throws:
StorageException
Method Detail

deleteJob

public void deleteJob(Context ctx,
                      Credentials cred,
                      int id)
               throws java.rmi.RemoteException,
                      InvalidDataException,
                      InvalidCredentialsException,
                      StorageException,
                      TaskManagerException
Description copied from interface: OXTaskMgmtInterface
This method is used to delete finished jobs (jobs != running) from the list

Specified by:
deleteJob in interface OXTaskMgmtInterface
Throws:
java.rmi.RemoteException
InvalidDataException
InvalidCredentialsException
StorageException
TaskManagerException

flush

public void flush(Context ctx,
                  Credentials cred)
           throws java.rmi.RemoteException,
                  InvalidDataException,
                  InvalidCredentialsException,
                  StorageException,
                  TaskManagerException
Description copied from interface: OXTaskMgmtInterface
Flushes all jobs from the queue which are finished ( != running)

Specified by:
flush in interface OXTaskMgmtInterface
Throws:
java.rmi.RemoteException
InvalidDataException
InvalidCredentialsException
StorageException
TaskManagerException

getJobList

public java.lang.String getJobList(Context ctx,
                                   Credentials cred)
                            throws java.rmi.RemoteException,
                                   InvalidDataException,
                                   InvalidCredentialsException,
                                   StorageException
Specified by:
getJobList in interface OXTaskMgmtInterface
Returns:
Throws:
java.rmi.RemoteException
InvalidDataException
InvalidCredentialsException
StorageException

getTaskResults

public java.lang.Object getTaskResults(Context ctx,
                                       Credentials cred,
                                       int id)
                                throws java.rmi.RemoteException,
                                       InvalidCredentialsException,
                                       StorageException,
                                       java.lang.InterruptedException,
                                       java.util.concurrent.ExecutionException,
                                       InvalidDataException
Description copied from interface: OXTaskMgmtInterface
Gets the result from the task with the specified id

Specified by:
getTaskResults in interface OXTaskMgmtInterface
Returns:
an object which has to be casted to the return value specified in the method which adds the job
Throws:
java.rmi.RemoteException
InvalidCredentialsException
StorageException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
InvalidDataException

getTaskResults

public java.lang.Object getTaskResults(int id)
                                throws java.lang.InterruptedException,
                                       java.util.concurrent.ExecutionException,
                                       InvalidDataException
Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
InvalidDataException

isTaskDone

public boolean isTaskDone(int id)
                   throws InvalidDataException
Throws:
InvalidDataException