| java.lang.Object org.mockejb.BasicEjbHome
All known Subclasses: org.mockejb.EntityBeanHome, org.mockejb.MDBHome, org.mockejb.SessionBeanHome,
BasicEjbHome | abstract class BasicEjbHome implements InvocationHandler,Serializable(Code) | | Base class for concrete Home implementations.
Creates proxy for home interface and calls "create" method.
"create" must be defined by the subclasses.
author: Alexander Ananiev |
Method Summary | |
abstract public Object | create(BasicEjbDescriptor descriptor, MockEjbObject ejbObject, Method homeMethod, Object[] paramVals) Implementors of this method must create an instance of a bean (if needed)
and call the required EJB lifecycle methods. | protected Object | createBean(BasicEjbDescriptor descriptor) Helper method to create a bean instance. | public Object | createProxy() | public boolean | equals(Object obj) If the object is a proxy, the pointer equality is used. | public EJBMetaData | getEJBMetaData() | public HomeHandle | getHomeHandle() | protected Object | getHomeProxy() | public int | hashCode() | public Object | invoke(Object thisProxy, Method homeMethod, Object[] paramVals) | protected Object | invokeBeanCreateMethod(Object bean, Method createMethod, Object[] paramVals) Invokes "ejbCreate" method of a bean. | protected Object | invokeBeanMethod(Object bean, Method homeMethod, String methodName, Class[] paramTypes, Object[] paramVals) Finds a method of the bean using reflection and calls InterceptorInvoker to
find interceptors and call the target. | Object | invokeBeanMethod(Object bean, Method homeMethod, String methodName) | protected Object | invokeBeanMethodWithPrefix(String prefix, Object bean, Method homeMethod, Object[] paramVals) | abstract public Object | invokeHomeMethod(BasicEjbDescriptor descriptor, Method homeMethod, Object[] paramVals) Implementors of this method can invoke home methods other than create and remove
suitable for their EJB type, such as ejbFind for entity bean.
If the EJB type only supports create and remove methods, this method must
throw exception. | protected Object | invokeNewInstance(Class beanClass) | public void | remove(Object obj) This method is not implemented by this class. | protected void | throwMethodNotImplemented(String methodName) | public String | toString() |
create | abstract public Object create(BasicEjbDescriptor descriptor, MockEjbObject ejbObject, Method homeMethod, Object[] paramVals) throws Exception(Code) | | Implementors of this method must create an instance of a bean (if needed)
and call the required EJB lifecycle methods.
Parameters: descriptor - Parameters: ejbObject - Parameters: homeMethod - Parameters: paramVals - Proxy created by the EjbObject ready to be returned to the client. |
createBean | protected Object createBean(BasicEjbDescriptor descriptor)(Code) | | Helper method to create a bean instance. If the bean object is passed in the
descriptor simply returns it, otherwise calls newInstance.
Parameters: descriptor - EJB descriptor bean object |
createProxy | public Object createProxy()(Code) | | Creates a new instance
|
equals | public boolean equals(Object obj)(Code) | | If the object is a proxy, the pointer equality is used.
Otherwise, super.equals is called.
|
hashCode | public int hashCode()(Code) | | |
invokeBeanCreateMethod | protected Object invokeBeanCreateMethod(Object bean, Method createMethod, Object[] paramVals) throws Exception(Code) | | Invokes "ejbCreate" method of a bean. Translate the name of the home
create method to the appropriate "ejbCreate".
Parameters: bean - target bean object Parameters: createMethod - create method of the home interface Parameters: paramVals - parameters of the create method (for entity and stateful beans) |
invokeBeanMethod | protected Object invokeBeanMethod(Object bean, Method homeMethod, String methodName, Class[] paramTypes, Object[] paramVals) throws Exception(Code) | | Finds a method of the bean using reflection and calls InterceptorInvoker to
find interceptors and call the target.
Parameters: bean - target bean object Parameters: homeMethod - home method being callese Parameters: methodName - name of the method of the target bean to call Parameters: paramTypes - types of the parameters of the target method Parameters: paramVals - parameters of the target method |
invokeHomeMethod | abstract public Object invokeHomeMethod(BasicEjbDescriptor descriptor, Method homeMethod, Object[] paramVals) throws Exception(Code) | | Implementors of this method can invoke home methods other than create and remove
suitable for their EJB type, such as ejbFind for entity bean.
If the EJB type only supports create and remove methods, this method must
throw exception.
Parameters: descriptor - Parameters: ejbObject - Parameters: homeMethod - Parameters: paramVals - return value of the home method |
invokeNewInstance | protected Object invokeNewInstance(Class beanClass)(Code) | | Create an instance of a bean
|
remove | public void remove(Object obj) throws RemoveException(Code) | | This method is not implemented by this class.
|
throwMethodNotImplemented | protected void throwMethodNotImplemented(String methodName)(Code) | | Helper method to throw NotImplementedException for this class
Parameters: methodName - |
|
|