org.qedeq.kernel.bo.common
Interface ServiceJob

All Superinterfaces:
java.lang.Comparable
All Known Subinterfaces:
InternalServiceJob
All Known Implementing Classes:
InternalServiceJobImpl

public interface ServiceJob
extends java.lang.Comparable

Process info for a kernel service.

Author:
Michael Meyling

Method Summary
 java.lang.String getActionName()
          Get action name.
 QedeqBoSet getBlockedModules()
          Get QedeqModules blocked by this process.
 QedeqBo[] getCurrentlyProcessedModules()
          Get currently processed QedeqModule list.
 java.lang.String getExecutionActionDescription()
          Get description of currently taken action.
 double getExecutionPercentage()
          Get percentage of currently running execution.
 long getId()
          Get process id.
 ModuleServiceCall getModuleServiceCall()
          Get currently running service call.
 java.lang.String getQedeqName()
          Get name of currently processed QedeqBo.
 java.lang.String getQedeqUrl()
          Get URL of currently processed QedeqBo.
 long getStart()
          Get timestamp for service start.
 long getStop()
          Get timestamp for service stop.
 java.lang.Thread getThread()
          Get thread the service runs within.
 void interrupt()
          Interrupt running thread.
 boolean isBlocked()
          Is the process running, but is blocked?
 boolean isRunning()
          Is the process still running?
 boolean wasFailure()
          Has the process finished with an exception? This is also true, if the user canceled the execution.
 boolean wasInterrupted()
          Has the process execution been canceled by the user?
 boolean wasSuccess()
          Has the process normally ended?
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getModuleServiceCall

ModuleServiceCall getModuleServiceCall()
Get currently running service call.

Returns:
Module service call. Might be null.

getThread

java.lang.Thread getThread()
Get thread the service runs within.

Returns:
Service thread.

getQedeqName

java.lang.String getQedeqName()
Get name of currently processed QedeqBo.

Returns:
Name of QEDEQ module. Might be empty string.

getQedeqUrl

java.lang.String getQedeqUrl()
Get URL of currently processed QedeqBo.

Returns:
URL of QEDEQ module. Might be empty string.

getStart

long getStart()
Get timestamp for service start.

Returns:
Service start timestamp.

getStop

long getStop()
Get timestamp for service stop.

Returns:
Service stop timestamp.

isRunning

boolean isRunning()
Is the process still running?

Returns:
The process is still running. (But it might be blocked.)

isBlocked

boolean isBlocked()
Is the process running, but is blocked?

Returns:
Process is running and blocked.

wasSuccess

boolean wasSuccess()
Has the process normally ended?

Returns:
Has the process normally ended?

wasFailure

boolean wasFailure()
Has the process finished with an exception? This is also true, if the user canceled the execution. See wasInterrupted().

Returns:
The process finished with an exception.

wasInterrupted

boolean wasInterrupted()
Has the process execution been canceled by the user?

Returns:
The process has been canceled by the user.

interrupt

void interrupt()
Interrupt running thread. Usually because of user canceling. This should initiate a InterruptException when Thread.interrupted() is true.


getActionName

java.lang.String getActionName()
Get action name. This is what the process mainly does.

Returns:
Action name.

getExecutionPercentage

double getExecutionPercentage()
Get percentage of currently running execution.

Returns:
Number between 0 and 100.

getExecutionActionDescription

java.lang.String getExecutionActionDescription()
Get description of currently taken action.

Returns:
We are doing this currently.

getBlockedModules

QedeqBoSet getBlockedModules()
Get QedeqModules blocked by this process.

Returns:
Blocked QEDEQ modules.

getCurrentlyProcessedModules

QedeqBo[] getCurrentlyProcessedModules()
Get currently processed QedeqModule list. This includes QEDEQ modules we try to get a lock for.

Returns:
QEDEQ modules we currently try to process.

getId

long getId()
Get process id.

Returns:
Process identifying number.


Copyright © 2014. All Rights Reserved.