org.jboss.webbeans.ejb.spi.helpers
Class ForwardingEjbDescriptor<T>

java.lang.Object
  extended by org.jboss.webbeans.ejb.spi.helpers.ForwardingEjbDescriptor<T>
All Implemented Interfaces:
EjbDescriptor<T>

public abstract class ForwardingEjbDescriptor<T>
extends java.lang.Object
implements EjbDescriptor<T>

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

Author:
Pete Muir

Constructor Summary
ForwardingEjbDescriptor()
           
 
Method Summary
protected abstract  EjbDescriptor<T> delegate()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getEjbName()
          Gets the EJB name
 java.lang.Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces()
          Gets the local business interfaces of the EJB
 java.lang.Iterable<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces()
          Gets the remote business interfaces of the EJB
 java.lang.Iterable<java.lang.reflect.Method> getRemoveMethods()
          Get the remove methods of the EJB
 java.lang.Class<T> getType()
          Gets the EJB type
 int hashCode()
           
 boolean isMessageDriven()
          Indicates if the EJB is and MDB
 boolean isSingleton()
          Indicates if the bean is a EJB 3.1 Singleton
 boolean isStateful()
          Indicates if the EJB is stateful
 boolean isStateless()
          Indicates if the bean is stateless
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingEjbDescriptor

public ForwardingEjbDescriptor()
Method Detail

delegate

protected abstract EjbDescriptor<T> delegate()

getEjbName

public java.lang.String getEjbName()
Description copied from interface: EjbDescriptor
Gets the EJB name

Specified by:
getEjbName in interface EjbDescriptor<T>
Returns:
The name

getLocalBusinessInterfaces

public java.lang.Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces()
Description copied from interface: EjbDescriptor
Gets the local business interfaces of the EJB

Specified by:
getLocalBusinessInterfaces in interface EjbDescriptor<T>
Returns:
An iterator over the local business interfaces

getRemoteBusinessInterfaces

public java.lang.Iterable<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces()
Description copied from interface: EjbDescriptor
Gets the remote business interfaces of the EJB

Specified by:
getRemoteBusinessInterfaces in interface EjbDescriptor<T>
Returns:
An iterator over the remote business interfaces

getRemoveMethods

public java.lang.Iterable<java.lang.reflect.Method> getRemoveMethods()
Description copied from interface: EjbDescriptor
Get the remove methods of the EJB

Specified by:
getRemoveMethods in interface EjbDescriptor<T>
Returns:
An iterator over the remove methods

getType

public java.lang.Class<T> getType()
Description copied from interface: EjbDescriptor
Gets the EJB type

Specified by:
getType in interface EjbDescriptor<T>
Returns:
The EJB Bean class

isMessageDriven

public boolean isMessageDriven()
Description copied from interface: EjbDescriptor
Indicates if the EJB is and MDB

Specified by:
isMessageDriven in interface EjbDescriptor<T>
Returns:
True if the bean is an MDB, false otherwise

isSingleton

public boolean isSingleton()
Description copied from interface: EjbDescriptor
Indicates if the bean is a EJB 3.1 Singleton

Specified by:
isSingleton in interface EjbDescriptor<T>
Returns:
True if the bean is a singleton, false otherwise

isStateful

public boolean isStateful()
Description copied from interface: EjbDescriptor
Indicates if the EJB is stateful

Specified by:
isStateful in interface EjbDescriptor<T>
Returns:
True if the bean is stateful, false otherwise

isStateless

public boolean isStateless()
Description copied from interface: EjbDescriptor
Indicates if the bean is stateless

Specified by:
isStateless in interface EjbDescriptor<T>
Returns:
True if stateless, false otherwise

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.