|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventExceptionHandler<T>
An exception handler to handle exception when invoking event listeners. The exception can be propagated or handled internally.
If the event container is transactional, then propagating the exception will cause the transaction to rollback, which handling it will cause the transaction to commit.
Method Summary | |
---|---|
void |
onException(ListenerExecutionFailedException exception,
T data,
GigaSpace gigaSpace,
TransactionStatus txStatus,
Object source)
A callback to handle exception in an event container. |
void |
onSuccess(T data,
GigaSpace gigaSpace,
TransactionStatus txStatus,
Object source)
A callback when a successful execution of a listener. |
Method Detail |
---|
void onSuccess(T data, GigaSpace gigaSpace, TransactionStatus txStatus, Object source) throws RuntimeException
data
- The actual data object of the eventgigaSpace
- A GigaSpace instance that can be used to perform additional operations against the
spacetxStatus
- An optional transaction status allowing to rollback a transaction programmaticallysource
- Optional additional data or the actual source event data object (where relevant)
RuntimeException
void onException(ListenerExecutionFailedException exception, T data, GigaSpace gigaSpace, TransactionStatus txStatus, Object source) throws RuntimeException
If the event container is transactional, then propagating the exception will cause the transaction to rollback, while handling it will cause the transaction to commit.
The TransactionStatus
can also be used to control if the transaction
should be rolled back without throwing an exception.
exception
- The listener thrown exceptiondata
- The actual data object of the eventgigaSpace
- A GigaSpace instance that can be used to perform additional operations against the
spacetxStatus
- An optional transaction status allowing to rollback a transaction programmaticallysource
- Optional additional data or the actual source event data object (where relevant)
RuntimeException
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |