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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancel the current pour.void
cancelPour
(String reason) Cancel the current pour with the specified reason.void
Clear the currently selected pourable.Return a newPourBuilder
which can be used to construct and start a beverage pour.void
setDelegate
(BeveragePipelineDelegate delegate) Set theBeveragePourServiceDelegate
for the pipeline.void
setSelected
(Pourable pourable) Set the selected pourable for use with free / fixed pours.setSelected
(String key) Set the selected pourable identified by thePourable
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
Set theBeveragePourServiceDelegate
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
Set the selected pourable identified by thePourable
key. The key will be passed toPourEngine.getPourable()
to convert to aPourable
suitable for use.- Parameters:
key
- the key to generate thePourable
from- Returns:
- the resulting pourable object
-
setSelected
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
Return a newPourBuilder
which can be used to construct and start a beverage pour. All pours must be initiated from aPourBuilder
. 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
Cancel the current pour with the specified reason. -
getPourEngine
-
getSelected
-