Package kos.api
Class EventBusSink.Result
- java.lang.Object
-
- kos.api.EventBusSink.Result
-
- Enclosing interface:
- EventBusSink
public static class EventBusSink.Result extends Object
Represents the outcome of an attempt to initialise eitherEventSubscriptionSinkorEventPublisherSink. Developers are encouraged to not throw exceptions when initialising Sinks. As a last-resort, one might store exceptions infailureCause. If the Sink is not entitled to initialise a givenaddress, one can just returnNOT_ATTEMPTED.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ThrowablefailureCause(package private) booleaninitialisedstatic EventBusSink.ResultNOT_ATTEMPTEDprivate StringrewrittenAddress
-
Constructor Summary
Constructors Constructor Description Result()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventBusSink.Resultfailure(Throwable failure)StringgetRewrittenAddressOr(String defaultValue)static EventBusSink.ResultsucceededAtAddress(String rewrittenAddress)
-
-
-
Field Detail
-
initialised
boolean initialised
-
failureCause
Throwable failureCause
-
rewrittenAddress
private String rewrittenAddress
-
NOT_ATTEMPTED
public static final EventBusSink.Result NOT_ATTEMPTED
-
-
Method Detail
-
failure
public static EventBusSink.Result failure(Throwable failure)
-
succeededAtAddress
public static EventBusSink.Result succeededAtAddress(String rewrittenAddress)
-
-