Class HandlerResult.Success<ERROR,EVENT>
- java.lang.Object
-
- dk.cloudcreate.essentials.components.eventsourced.aggregates.decider.HandlerResult.Success<ERROR,EVENT>
-
- Type Parameters:
ERROR- the type of Error supported by theHandlerEVENT- the type of Events supported by theHandler
- All Implemented Interfaces:
HandlerResult<ERROR,EVENT>
- Enclosing interface:
- HandlerResult<ERROR,EVENT>
public static class HandlerResult.Success<ERROR,EVENT> extends Object implements HandlerResult<ERROR,EVENT>
Success variant of theHandlerResult
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dk.cloudcreate.essentials.components.eventsourced.aggregates.decider.HandlerResult
HandlerResult.Error<ERROR,EVENT>, HandlerResult.Success<ERROR,EVENT>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<EVENT>events()booleanisError()Did the command handling result in an error?-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dk.cloudcreate.essentials.components.eventsourced.aggregates.decider.HandlerResult
asError, asSuccess, isSuccess, shouldFailWith, shouldSucceedWith, shouldSucceedWith
-
-
-
-
Constructor Detail
-
Success
public Success(List<EVENT> events)
Create a Success variant of theHandlerResult- Parameters:
events- the (non-null) events that theHandler.handle(Object, Object)resulted in. Is allowed to be empty
-
Success
public Success(EVENT... events)
-
-
Method Detail
-
isError
public boolean isError()
Description copied from interface:HandlerResultDid the command handling result in an error?- Specified by:
isErrorin interfaceHandlerResult<ERROR,EVENT>- Returns:
- Did the command handling result in an error?
-
-