org.jboss.seam.exception.control
Class HandlerMethodImpl<T extends Throwable>

java.lang.Object
  extended by org.jboss.seam.exception.control.HandlerMethodImpl<T>
Type Parameters:
T - Type of the exception this handler handles.
All Implemented Interfaces:
HandlerMethod<T>

public class HandlerMethodImpl<T extends Throwable>
extends Object
implements HandlerMethod<T>

Implementation of HandlerMethod.


Constructor Summary
HandlerMethodImpl(javax.enterprise.inject.spi.AnnotatedMethod method, javax.enterprise.inject.spi.BeanManager bm)
          Sole Constructor.
 
Method Summary
 boolean equals(Object o)
           
 javax.enterprise.inject.spi.Bean<?> getBean(javax.enterprise.inject.spi.BeanManager bm)
          Obtains the Bean reference that declares the observer method.
 Class<?> getBeanClass()
          Obtains the bean class of the bean that declares the observer method.
 Type getExceptionType()
          Obtains the handled event type.
 Method getJavaMethod()
          Obtains the actual method of the handler.
 int getPrecedence()
          Obtains the precedence of the handler.
 Set<Annotation> getQualifiers()
          Obtains the set of handled event qualifiers.
 TraversalPath getTraversalPath()
          Obtains the direction of the traversal path the handler will be listening.
 int hashCode()
           
 void notify(CaughtException<T> event, javax.enterprise.inject.spi.BeanManager bm)
          Calls the handler method, passing the given event object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HandlerMethodImpl

public HandlerMethodImpl(javax.enterprise.inject.spi.AnnotatedMethod method,
                         javax.enterprise.inject.spi.BeanManager bm)
Sole Constructor.

Parameters:
method - found handler
bm - active BeanManager
Throws:
IllegalArgumentException - if method is null, has no params or first param is not annotated with Handles
Method Detail

getBeanClass

public Class<?> getBeanClass()
Obtains the bean class of the bean that declares the observer method.

Specified by:
getBeanClass in interface HandlerMethod<T extends Throwable>

getBean

public javax.enterprise.inject.spi.Bean<?> getBean(javax.enterprise.inject.spi.BeanManager bm)
Obtains the Bean reference that declares the observer method.

Specified by:
getBean in interface HandlerMethod<T extends Throwable>
Parameters:
bm - Active BeanManager

getQualifiers

public Set<Annotation> getQualifiers()
Obtains the set of handled event qualifiers.

Specified by:
getQualifiers in interface HandlerMethod<T extends Throwable>

getExceptionType

public Type getExceptionType()
Obtains the handled event type.

Specified by:
getExceptionType in interface HandlerMethod<T extends Throwable>

notify

public void notify(CaughtException<T> event,
                   javax.enterprise.inject.spi.BeanManager bm)
Calls the handler method, passing the given event object.

Specified by:
notify in interface HandlerMethod<T extends Throwable>
Parameters:
event - event to pass to the handler.
bm - Active BeanManager

getTraversalPath

public TraversalPath getTraversalPath()
Obtains the direction of the traversal path the handler will be listening.

Specified by:
getTraversalPath in interface HandlerMethod<T extends Throwable>

getPrecedence

public int getPrecedence()
Obtains the precedence of the handler.

Specified by:
getPrecedence in interface HandlerMethod<T extends Throwable>

getJavaMethod

public Method getJavaMethod()
Obtains the actual method of the handler.

Specified by:
getJavaMethod in interface HandlerMethod<T extends Throwable>

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 Seam Framework. All Rights Reserved.