Package org.opentcs.components.kernel
Interface PeripheralJobDispatcher
- All Superinterfaces:
Lifecycle
public interface PeripheralJobDispatcher extends Lifecycle
This interface declares the methods a peripheral job dispatcher module for the openTCS kernel
must implement.
A peripheral job dispatcher manages the distribution of peripheral jobs among the peripheral devices represented by locations in a system. It is basically event-driven, where an event can be a new peripheral job being introduced into the system or a peripheral device becoming available for processing existing jobs.
-
Method Summary
Modifier and Type Method Description void
dispatch()
Notifies the dispatcher that it should start the dispatching process.void
withdrawJob(Location location)
Notifies the dispatcher that any job a peripheral device (represented by the given location) might be processing is to be withdrawn.void
withdrawJob(PeripheralJob job)
Notifies the dispatcher that the given peripheral job is to be withdrawn.Methods inherited from interface org.opentcs.components.Lifecycle
initialize, isInitialized, terminate
-
Method Details
-
dispatch
void dispatch()Notifies the dispatcher that it should start the dispatching process.This method is supposed to be called only from the kernel executor thread.
-
withdrawJob
Notifies the dispatcher that any job a peripheral device (represented by the given location) might be processing is to be withdrawn.This method is supposed to be called only from the kernel executor thread.
- Parameters:
location
- The location representing a peripheral device whose job is withdrawn.- Throws:
java.lang.IllegalArgumentException
- If the given peripheral's current job is already in a final state, or if it is related to a transport order and this transport order is not in a final state.
-
withdrawJob
Notifies the dispatcher that the given peripheral job is to be withdrawn.This method is supposed to be called only from the kernel executor thread.
- Parameters:
job
- The job to be withdrawn.- Throws:
java.lang.IllegalArgumentException
- If the given peripheral job is already in a final state, or if it is related to a transport order and this transport order is not in a final state.
-