Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actually encapsulating all the functionality into one place to get info about Handler methods.
- Loading branch information
1 parent
332e5b0
commit 7d83fb3
Showing
20 changed files
with
369 additions
and
189 deletions.
There are no files selected for viewing
41 changes: 0 additions & 41 deletions
41
api/src/main/java/org/jboss/seam/exception/control/DuringAscTraversal.java
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
api/src/main/java/org/jboss/seam/exception/control/DuringDescTraversal.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
api/src/main/java/org/jboss/seam/exception/control/TraversalPath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2010, Red Hat, Inc., and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
|
||
package org.jboss.seam.exception.control; | ||
|
||
/** | ||
* Direction of a exception cause chain traversal. | ||
*/ | ||
public enum TraversalPath | ||
{ | ||
ASCENDING, | ||
DESCENDING | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
impl/src/main/java/org/jboss/seam/exception/control/HandlerMethod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2010, Red Hat, Inc., and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
*/ | ||
|
||
package org.jboss.seam.exception.control; | ||
|
||
import javax.enterprise.inject.spi.Bean; | ||
import javax.enterprise.inject.spi.BeanManager; | ||
import java.lang.annotation.Annotation; | ||
import java.lang.reflect.Method; | ||
import java.lang.reflect.Type; | ||
import java.util.Set; | ||
|
||
public interface HandlerMethod<T extends Throwable> | ||
{ | ||
/** | ||
* Obtains the bean class of the bean that declares the observer method. | ||
*/ | ||
Class<?> getBeanClass(); | ||
|
||
/** | ||
* Obtains the Bean reference that declares the observer method. | ||
*/ | ||
Bean<?> getBean(); | ||
|
||
/** | ||
* Obtains the set of handled event qualifiers. | ||
*/ | ||
Set<Annotation> getHandlesQualifiers(); | ||
|
||
/** | ||
* Obtains the handled event type. | ||
*/ | ||
Type getExceptionType(); | ||
|
||
/** | ||
* Calls the handler method, passing the given event object. | ||
* | ||
* @param event event to pass to the handler. | ||
* @param bm Active BeanManager | ||
*/ | ||
void notify(CatchEvent<T> event, BeanManager bm); | ||
|
||
/** | ||
* Obtains the direction of the traversal path the handler will be listening. | ||
*/ | ||
TraversalPath getTraversalPath(); | ||
|
||
/** | ||
* Obtains the precedence of the handler. | ||
*/ | ||
int getPrecedence(); | ||
|
||
/** | ||
* Obtains the actual method of the handler. | ||
*/ | ||
Method getJavaMethod(); | ||
} |
Oops, something went wrong.