org.jboss.webbeans.ejb.spi.helpers
Class ForwardingEjbServices

java.lang.Object
  extended by org.jboss.webbeans.ejb.spi.helpers.ForwardingEjbServices
All Implemented Interfaces:
Service, EjbServices

public abstract class ForwardingEjbServices
extends java.lang.Object
implements EjbServices

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

Author:
Pete Muir

Constructor Summary
ForwardingEjbServices()
           
 
Method Summary
abstract  EjbServices delegate()
           
 java.lang.Iterable<EjbDescriptor<?>> discoverEjbs()
          Gets a descriptor for each EJB in the application
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor)
          Request a reference to an EJB session object from the container.
 java.lang.Object resolveEjb(InjectionPoint injectionPoint)
          Resolve the value for the given @EJB injection point
 java.lang.Object resolveRemoteEjb(java.lang.String jndiName, java.lang.String mappedName, java.lang.String ejbLink)
          Resolve a remote EJB reference.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingEjbServices

public ForwardingEjbServices()
Method Detail

delegate

public abstract EjbServices delegate()

resolveEjb

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

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

resolveEjb

public SessionObjectReference resolveEjb(EjbDescriptor<?> ejbDescriptor)
Description copied from interface: EjbServices
Request a reference to an EJB session object from the container. If the EJB being resolved is a stateful session bean, the container should ensure the session bean is created before this method returns.

Specified by:
resolveEjb in interface EjbServices
Parameters:
ejbDescriptor - the ejb to resolve
Returns:
a reference to the session object

resolveRemoteEjb

public java.lang.Object resolveRemoteEjb(java.lang.String jndiName,
                                         java.lang.String mappedName,
                                         java.lang.String ejbLink)
Description copied from interface: EjbServices
Resolve a remote EJB reference. At least one of the parameters will not be null.

Specified by:
resolveRemoteEjb in interface EjbServices
Parameters:
jndiName - the JNDI name
mappedName - the mapped name
ejbLink - the EJB link name
Returns:
the remote EJB reference

discoverEjbs

public java.lang.Iterable<EjbDescriptor<?>> discoverEjbs()
Description copied from interface: EjbServices
Gets a descriptor for each EJB in the application

Specified by:
discoverEjbs in interface EjbServices
Returns:
the EJB descriptors

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 © 2011. All Rights Reserved.