Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
MessageExceptionHandler |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.ksb.messaging.exceptionhandling; | |
17 | ||
18 | import org.kuali.rice.ksb.messaging.PersistedMessageBO; | |
19 | ||
20 | /** | |
21 | * A MessageExceptionHandler handles exception which arrise during processing of the | |
22 | * message. | |
23 | * | |
24 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
25 | */ | |
26 | public interface MessageExceptionHandler { | |
27 | ||
28 | public void handleException(Throwable throwable, PersistedMessageBO message, Object service) throws Exception; | |
29 | ||
30 | public void handleExceptionLastDitchEffort(Throwable throwable, PersistedMessageBO message, Object service) throws Exception; | |
31 | ||
32 | /** | |
33 | * Determines whether the message would go into Exception if submitted. | |
34 | * @param message The PersistedMessageBO instance to be tested. | |
35 | * @return Returns true if the message would go into exception, otherwise returns false. | |
36 | */ | |
37 | public boolean isInException(PersistedMessageBO message); | |
38 | ||
39 | } |