Class BeveragePipelineService

java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.ext.dispense.pipeline.beverage.BeveragePipelineService
All Implemented Interfaces:
CtxEventListener, ContextHandleAware, HandleAware, Ready, ReadyAndReadyListener, ReadyListener

public class BeveragePipelineService extends AbstractService
Service that provides basic select and pour functionality on top of a PourEngine.
Since:
1.0
Version:
2023-08-08
  • Constructor Details

    • BeveragePipelineService

      public BeveragePipelineService()
  • Method Details

    • setDelegate

      public void setDelegate(BeveragePipelineDelegate delegate)
      Set the BeveragePourServiceDelegate for the pipeline. This can be used to manually set the delegate instead of using autowiring which allows the delegate to be set later, or changed over time.
    • setSelected

      public Pourable setSelected(String key)
      Set the selected pourable identified by the Pourable key. The key will be passed to PourEngine.getPourable() to convert to a Pourable suitable for use.
      Parameters:
      key - the key to generate the Pourable from
      Returns:
      the resulting pourable object
    • setSelected

      public void setSelected(Pourable pourable)
      Set the selected pourable for use with free / fixed pours. Setting to a pourable that is not equal to the currently selected pourable will cause the current pour to be cancelled.
      Parameters:
      pourable - the pourable to select or null to deselect
    • clearSelected

      public void clearSelected()
      Clear the currently selected pourable.
    • getBuilder

      public BeveragePourBuilder getBuilder()
      Return a new PourBuilder which can be used to construct and start a beverage pour. All pours must be initiated from a PourBuilder . A builder can only be used for a single pour and the builder should be used immediately to ensure that the described pour can be poured.
    • cancelPour

      public void cancelPour()
      Cancel the current pour.
    • cancelPour

      public void cancelPour(String reason)
      Cancel the current pour with the specified reason.
    • getPourEngine

      public BeveragePourEngine<?> getPourEngine()
    • getSelected

      public Pourable getSelected()