Class AcceptingBehavior
- java.lang.Object
-
- de.quantummaid.eventmaid.subscribing.AcceptingBehavior
-
public final class AcceptingBehavior extends Object
When accepting a message, aSubscribercan decide if it the delivery to subsequentSubscribersshould continue or if the delivery is preempted.- See Also:
- EventMaid Documentation
-
-
Field Summary
Fields Modifier and Type Field Description static AcceptingBehaviorMESSAGE_ACCEPTEDThe message was accepted and the delivery continues.static AcceptingBehaviorMESSAGE_ACCEPTED_AND_STOP_DELIVERYThe message was accepted and the delivery can stop early.
-
Constructor Summary
Constructors Constructor Description AcceptingBehavior()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AcceptingBehavioracceptingBehavior(boolean continueDelivery)Factory method to create a newAcceptingBehavior.booleancontinueDelivery()
-
-
-
Field Detail
-
MESSAGE_ACCEPTED
public static final AcceptingBehavior MESSAGE_ACCEPTED
The message was accepted and the delivery continues.
-
MESSAGE_ACCEPTED_AND_STOP_DELIVERY
public static final AcceptingBehavior MESSAGE_ACCEPTED_AND_STOP_DELIVERY
The message was accepted and the delivery can stop early.
-
-
Method Detail
-
acceptingBehavior
public static AcceptingBehavior acceptingBehavior(boolean continueDelivery)
Factory method to create a newAcceptingBehavior.- Parameters:
continueDelivery-truecontinues the delivery,falsepreempts it- Returns:
- a new
AcceptingBehavior
-
continueDelivery
public boolean continueDelivery()
-
-