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:
com.tccc.kos.commons.core.context.CtxEventListener, com.tccc.kos.commons.core.service.handle.ContextHandleAware, com.tccc.kos.commons.core.service.handle.HandleAware, com.tccc.kos.commons.util.ready.Ready, com.tccc.kos.commons.util.ready.ReadyListener

public class BeveragePipelineService extends com.tccc.kos.commons.core.service.AbstractService
Service that provides basic select and pour functionality on top of a PourEngine.
Since:
1.0
Version:
2023-08-08
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel the current pour.
    void
    Cancel the current pour with the specified reason.
    void
    Clear the currently selected pourable.
    Return a new PourBuilder which can be used to construct and start a beverage pour.
     
     
    void
    Set the BeveragePourServiceDelegate for the pipeline.
    void
    Set the selected pourable for use with free / fixed pours.
    Set the selected pourable identified by the Pourable key.

    Methods inherited from class com.tccc.kos.commons.core.service.AbstractService

    getHandle, getHandlePrefix

    Methods inherited from class com.tccc.kos.commons.util.ready.ReadyBean

    getReady, onBeanReady, onDependenciesReady

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener

    onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompleted

    Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware

    addHandleChild, getName, getPath

    Methods inherited from interface com.tccc.kos.commons.util.ready.Ready

    isReady, setReady

    Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener

    onDependenciesGroupReady
  • 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()