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.ReadyAndReadyListener,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 TypeMethodDescriptionvoidCancel the current pour.voidcancelPour(String reason) Cancel the current pour with the specified reason.voidClear the currently selected pourable.Return a newPourBuilderwhich can be used to construct and start a beverage pour.voidsetDelegate(BeveragePipelineDelegate delegate) Set theBeveragePourServiceDelegatefor the pipeline.voidsetSelected(Pourable pourable) Set the selected pourable for use with free / fixed pours.setSelected(String defStr) Set the selected pourable identified by thePourabledefinition string.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefixMethods inherited from class com.tccc.kos.commons.util.ready.ReadyBean
getReadyMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompletedMethods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPathMethods inherited from interface com.tccc.kos.commons.util.ready.Ready
isReady, setReadyMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyAndReadyListener
onBeanReady, onDependenciesReadyMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Constructor Details
-
BeveragePipelineService
public BeveragePipelineService()
-
-
Method Details
-
setDelegate
Set theBeveragePourServiceDelegatefor 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 thePourabledefinition string. The defintion string will be passed toPourEngine.getPourable()to convert to aPourablesuitable for use.- Parameters:
defStr- the definition string to generate thePourablefrom- 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 newPourBuilderwhich 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
-