Interface Job

  • All Superinterfaces:
    java.lang.Runnable

    public interface Job
    extends java.lang.Runnable
    Job executed by a Team.
    Author:
    Daniel Sagenschneider
    • Method Detail

      • getProcessIdentifier

        java.lang.Object getProcessIdentifier()

        Obtains the identifier for the ProcessState containing this Job.

        This allows the Team executing the Job to be aware of the ProcessState context in which the Job is to be executed.

        An example use would be embedding OfficeFloor within an Application Server and using this identifier and a ThreadLocalAwareTeam to know the invoking Thread for interaction with ThreadLocal instances of the Application Server.

        Returns:
        Identifier for the ProcessState containing this Job
        See Also:
        ThreadLocalAwareTeam
      • cancel

        void cancel​(java.lang.Throwable cause)
        Enables a Team to cancel the Job should it be overloaded with Job instances.
        Parameters:
        cause - Reason by Team for canceling the Job.