Package com.tccc.kos.ext.dispense
Interface Pour
- All Superinterfaces:
com.tccc.kos.commons.util.Abortable
,com.tccc.kos.commons.util.Cancelable
,com.tccc.kos.commons.util.Terminable
- All Known Implementing Classes:
BeveragePour
,PumpIntent
public interface Pour
extends com.tccc.kos.commons.util.Terminable
Abstraction of a pour from a pump's perspective. A pump may be used
in various types of pours (beverage, ingredient, etc...) and this
provides some context about the higher level pour that the pump
is participating in. This is typically used for higher level logic
such as error handling where there is a need to better understand
the big picture of the pour, beyond what the pump itself is aware of.
This implements Terminable
which provides a convenient way
to cancel or abort the a pour without needing to know anything about
how it was started or what type of pour it is.
- Since:
- 1.6
- Version:
- 2025-02-02
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
getGroup()
Return the group thisPour
is part of.getProperty
(String name) Return the value of a property.void
setProperty
(String name, Object value) Set the value of a property.Methods inherited from interface com.tccc.kos.commons.util.Abortable
abort
Methods inherited from interface com.tccc.kos.commons.util.Cancelable
cancel
-
Method Details
-
getGroup
Return the group thisPour
is part of. By default this returns thePour
object itself as each pour is typically an independent group. However, in special cases, such as delegated pump intents, where the same intent is used concurrently across child pumps, they are typically considered to be part of the same group with regards to error handling. In this case this should return the same object of all relatedPour
objects.The object returned by this method should only be used for @{code ==} comparisons as the object itself has no meaning.
-
setProperty
Set the value of a property. This is a way to attach arbitrary data to thePour
object. -
getProperty
Return the value of a property.
-