Class PerishableCountDown.Builder
java.lang.Object
uk.ac.gda.services.common.endstation.PerishableCountDown.Builder
- Direct Known Subclasses:
PerishableCountDown.EstablishedIntervalCountDownBuilder,PerishableCountDown.ImminentExpiryCountDownBuilder
- Enclosing class:
PerishableCountDown
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Provides Builder for head of a chained call construction of an expiring count downloggingDebugMessagesUsing(Consumer<String> loggerAction) Builder chain call for hooking up requesting class' logging actionprotected voidsetPayload(Perishable perishable) protected voidsetPayloadUsing(LocalDateTime expiration) withTheCounterExpiringOnceRemainingSecondsReach(int thresholdSeconds) Builder chain call for setting "early" closure of dialog ( e.g.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
setPayload
-
setPayloadUsing
-
loggingDebugMessagesUsing
Builder chain call for hooking up requesting class' logging action- Parameters:
loggerAction- e.g. logger::debug in a class which builds the count down- Returns:
- builder for a chained construction call
-
withTheCounterExpiringOnceRemainingSecondsReach
public PerishableCountDown.Builder withTheCounterExpiringOnceRemainingSecondsReach(int thresholdSeconds) Builder chain call for setting "early" closure of dialog ( e.g. on +1 seconds )- Parameters:
thresholdSeconds- size of count down tail when dialog should disappear- Returns:
- builder for a chained construction call
-
build
Provides Builder for head of a chained call construction of an expiring count down- Returns:
- builder which creates count down expiring in synch with input
-