Class OrderPlanThread

java.lang.Object
java.lang.Thread
de.dlr.proseo.planner.util.OrderPlanThread
All Implemented Interfaces:
Runnable

public class OrderPlanThread extends Thread
Thread handling the planning process of a single processing order, creating job steps, and updating its planning state accordingly.
Author:
Ernst Melchinger
  • Constructor Details

    • OrderPlanThread

      public OrderPlanThread(ProductionPlanner productionPlanner, OrderDispatcher orderDispatcher, long orderId, long facilityId, Boolean wait, String user, String pw, String name)
      Create a new OrderPlanThread.
      Parameters:
      productionPlanner - The production planner instance
      orderDispatcher - The order dispatcher
      orderId - The ID of the processing order to plan
      facilityId - The ID of the processing facility to run the order
      user - The current user
      pw - The password of user
      name - The name of the thread
  • Method Details

    • getResultMessage

      public PlannerResultMessage getResultMessage()
      Get the result message of the planning.
      Returns:
      the resultMessage
    • run

      public void run()
      Starts the thread and initiates the planning process for the given order.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • plan

      public PlannerResultMessage plan(long orderId) throws InterruptedException
      Plan the given order by creating job steps and updating its state.
      Parameters:
      orderId - The ID of the order to plan
      Returns:
      The result message of the planning
      Throws:
      InterruptedException