Class HandlerResult.Error<ERROR,EVENT>
- java.lang.Object
-
- dk.cloudcreate.essentials.components.eventsourced.aggregates.decider.HandlerResult.Error<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.Error<ERROR,EVENT> extends Object implements HandlerResult<ERROR,EVENT>
Error 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>
-
-
Constructor Summary
Constructors Constructor Description Error(ERROR error)Create an Error variant of theHandlerResult
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ERRORerror()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
-
Error
public Error(ERROR error)
Create an Error variant of theHandlerResult- Parameters:
error- the error (non-null) that theHandler.handle(Object, Object)resulted in
-
-
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?
-
error
public ERROR error()
-
-