Demand Carrier Ifc
Transports demands from a shipper (origin) to a receiver (destination). Implementations range from the trivial NoDelayDemandCarrier (immediate ship+deliver) to the network- aware NetworkDemandCarrierByTime (per-edge transport-time sampling with statistics).
The two-method surface separates what a carrier does from whether it can do it:
transportDemand performs the work. Implementations may throw
NoCarrierOptionExceptionwhen configuration is missing.canShip is a side-effect-free probe. Callers — including the carrier itself, as a self-guard in
transportDemand, and external configuration code — may invoke it to test whether a givendemandwould route successfully without actually triggering the transport.
See sc.transportlayer.DemandCarrierIfc
Inheritors
Functions
Side-effect-free probe: returns true iff demand would route successfully under the carrier's current configuration. A false result indicates transportDemand would either throw or silently drop the demand. Useful as a self-guard inside carrier implementations and as a configuration test from external code.
Transport demand from its origin to its destination.