org.mockejb
Class BasicEjbDescriptor

java.lang.Object
  extended byorg.mockejb.BasicEjbDescriptor
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EntityBeanDescriptor, MDBDescriptor, SessionBeanDescriptor

public abstract class BasicEjbDescriptor
extends java.lang.Object
implements java.io.Serializable

Provides the information that MockEJB needs to "deploy" this EJB. This includes classes of EJB Home, business interface and implementation. MockContainer uses this data to create dynamic proxies acting as Home and EJBObject. This is the base class for concrete MDB, Session and Entity Descriptor implementations.

Author:
Alexander Ananiev
See Also:
Serialized Form

Constructor Summary
BasicEjbDescriptor(java.lang.String jndiName, java.lang.Class homeClass, java.lang.Class ifaceClass, java.lang.Class beanClass)
          Creates a new instance of the descriptor.
BasicEjbDescriptor(java.lang.String jndiName, java.lang.Class homeClass, java.lang.Class ifaceClass, java.lang.Object bean)
          Creates a new instance of the descriptor.
 
Method Summary
 java.lang.Object getBean()
           
 java.lang.Class getBeanClass()
           
 java.lang.Class getHomeClass()
           
 java.lang.Class getIfaceClass()
           
 java.lang.String getJndiName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicEjbDescriptor

public BasicEjbDescriptor(java.lang.String jndiName,
                          java.lang.Class homeClass,
                          java.lang.Class ifaceClass,
                          java.lang.Class beanClass)
Creates a new instance of the descriptor.

Parameters:
jndiName - jndiName to bind Home to. Note that MockEjb does not support bean-scoped context, so this name must be unique.
homeClass - class of the home interface
ifaceClass - class of the business interface, remote or local
beanClass - class of the implementation class

BasicEjbDescriptor

public BasicEjbDescriptor(java.lang.String jndiName,
                          java.lang.Class homeClass,
                          java.lang.Class ifaceClass,
                          java.lang.Object bean)
Creates a new instance of the descriptor.

Parameters:
jndiName - jndiName to bind Home to. Note that MockEjb does not support bean-scoped context, so this name must be unique.
homeClass - class of the home interface
ifaceClass - class of the business interface, remote or local
bean - instance of a bean implementation class.
Method Detail

getJndiName

public java.lang.String getJndiName()

getHomeClass

public java.lang.Class getHomeClass()

getBeanClass

public java.lang.Class getBeanClass()

getBean

public java.lang.Object getBean()

getIfaceClass

public java.lang.Class getIfaceClass()