org.jboss.webbeans.ejb.spi
Class ForwardingEjbResolver

java.lang.Object
  extended by org.jboss.webbeans.ejb.spi.ForwardingEjbResolver
All Implemented Interfaces:
EjbResolver

public abstract class ForwardingEjbResolver
extends java.lang.Object
implements EjbResolver

An implementation of EjbResolver which forwards all its method calls to another EjbResolver}. Subclasses should override one or more methods to modify the behavior of the backing EjbResolver as desired per the decorator pattern.

Author:
Pete Muir

Field Summary
 
Fields inherited from interface org.jboss.webbeans.ejb.spi.EjbResolver
PROPERTY_NAME
 
Constructor Summary
ForwardingEjbResolver()
           
 
Method Summary
abstract  EjbResolver delegate()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.Class<? extends java.lang.annotation.Annotation> getEJBAnnotation()
          Get the annotation which defines an @EJB injection point
 java.lang.Class<? extends java.lang.annotation.Annotation> getPersistenceContextAnnotation()
          Get the annotation which defines a @PersistenceContext injection point
 java.lang.Class<? extends java.lang.annotation.Annotation> getResourceAnnotation()
          Get the annotation which defines a @Resource injection point
 int hashCode()
           
 java.lang.Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext)
          Resolve the value for the given @EJB injection point
 java.lang.Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext)
          Resolve the value for the given @PersistenceContext injection point
 java.lang.Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext)
          Resolve the value for the given @Resource injection point
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingEjbResolver

public ForwardingEjbResolver()
Method Detail

delegate

public abstract EjbResolver delegate()

getEJBAnnotation

public java.lang.Class<? extends java.lang.annotation.Annotation> getEJBAnnotation()
Description copied from interface: EjbResolver
Get the annotation which defines an @EJB injection point

Specified by:
getEJBAnnotation in interface EjbResolver
Returns:
the annotation which defines an @EJB injection point

getPersistenceContextAnnotation

public java.lang.Class<? extends java.lang.annotation.Annotation> getPersistenceContextAnnotation()
Description copied from interface: EjbResolver
Get the annotation which defines a @PersistenceContext injection point

Specified by:
getPersistenceContextAnnotation in interface EjbResolver
Returns:
the annotation which defines a @PersistenceContext injection point

getResourceAnnotation

public java.lang.Class<? extends java.lang.annotation.Annotation> getResourceAnnotation()
Description copied from interface: EjbResolver
Get the annotation which defines a @Resource injection point

Specified by:
getResourceAnnotation in interface EjbResolver
Returns:
the annotation which defines a @Resource injection point

resolveEjb

public java.lang.Object resolveEjb(InjectionPoint injectionPoint,
                                   NamingContext namingContext)
Description copied from interface: EjbResolver
Resolve the value for the given @EJB injection point

Specified by:
resolveEjb in interface EjbResolver
Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the EJB

resolvePersistenceContext

public java.lang.Object resolvePersistenceContext(InjectionPoint injectionPoint,
                                                  NamingContext namingContext)
Description copied from interface: EjbResolver
Resolve the value for the given @PersistenceContext injection point

Specified by:
resolvePersistenceContext in interface EjbResolver
Parameters:
injectionPoint - the injection point metadata
namingContext - the pluggable Web Beans JNDI lookup facility
Returns:
an instance of the persistence unit

resolveResource

public java.lang.Object resolveResource(InjectionPoint injectionPoint,
                                        NamingContext namingContext)
Description copied from interface: EjbResolver
Resolve the value for the given @Resource injection point

Specified by:
resolveResource in interface EjbResolver
Parameters:
injectionPoint - the injection point metadata
namingContext - the pluggable Web Beans JNDI lookup facility
Returns:
an instance of the resource

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2008-2009. All Rights Reserved.