Package org.opentcs.components.kernel.services

# Interface DispatcherService

    public interface DispatcherService

Provides methods concerning the `Dispatcher`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `void` | `dispatch()` | Explicitly trigger the dispatching process.
  `void` | `withdrawByTransportOrder​(TCSObjectReference<TransportOrder> ref, boolean immediateAbort)` | Withdraw the referenced order.
  `void` | `withdrawByVehicle​(TCSObjectReference<Vehicle> ref, boolean immediateAbort)` | Withdraw any order that a vehicle might be processing.

- ## Method Details

  - ### dispatch

    void dispatch() throws KernelRuntimeException
    Explicitly trigger the dispatching process.
    Throws:
      `KernelRuntimeException` - In case there is an exception executing this method.

  - ### withdrawByVehicle

    void withdrawByVehicle​(TCSObjectReference<Vehicle> ref, boolean immediateAbort) throws ObjectUnknownException, KernelRuntimeException
    Withdraw any order that a vehicle might be processing.
    Parameters:
      `ref` - A reference to the vehicle to be modified.
      `immediateAbort` - If `false`, this method once will initiate the withdrawal, leaving the transport order assigned to the vehicle until it has finished the movements that it has already been ordered to execute. The transport order's state will change to `TransportOrder.State.WITHDRAWN`. If `true`, the dispatcher will withdraw the order from the vehicle without further waiting.
    Throws:
      `ObjectUnknownException` - If the referenced vehicle does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.

  - ### withdrawByTransportOrder

    void withdrawByTransportOrder​(TCSObjectReference<TransportOrder> ref, boolean immediateAbort) throws ObjectUnknownException, KernelRuntimeException
    Withdraw the referenced order.
    Parameters:
      `ref` - A reference to the transport order to be withdrawn.
      `immediateAbort` - If `false`, this method once will initiate the withdrawal, leaving the transport order assigned to the vehicle until it has finished the movements that it has already been ordered to execute. The transport order's state will change to `TransportOrder.State.WITHDRAWN`. If `true`, the dispatcher will withdraw the order from the vehicle without further waiting.
    Throws:
      `ObjectUnknownException` - If the referenced transport order does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.