1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.api.exception; 8 9 10 import org.mule.routing.filters.WildcardFilter; 11 12 /** 13 * Take some action when a system exception has occurred (i.e., there was no message in play when the exception occurred). 14 */ 15 public interface SystemExceptionHandler 16 { 17 /** 18 * Take some action when a system exception has occurred (i.e., there was no message in play when the exception occurred). 19 * 20 * @param exception which occurred 21 */ 22 void handleException(Exception exception); 23 24 /** 25 * Returns the filter that given an exception class will determine if a 26 * transaction should be committed or not. 27 * 28 * @return the exception filter configured for commit of transactions or 29 * null if there is no filter. 30 */ 31 WildcardFilter getCommitTxFilter(); 32 33 /** 34 * Returns the filter that given an exception class will determine if a 35 * transaction should be rollbacked or not. 36 * 37 * @return the exception filter configured for rollback of transactions or 38 * null if there is no filter. 39 */ 40 WildcardFilter getRollbackTxFilter(); 41 } 42 43