org.objectweb.easybeans.api
Interface Factory

All Known Implementing Classes:
AbsFactory, MDBFactory, MDBMessageEndPointFactory, SessionFactory, StatefulSessionFactory, StatelessSessionFactory

public interface Factory

This interface is used by all bean factories of EJB 3 container.

Author:
Florent Benoit

Method Summary
 IBeanInfo getBeanInfo()
          Gets the bean information.
 EZBContainer getContainer()
          Gets the container used by this factory.
 javax.naming.Context getJavaContext()
          Gets the java: context.
 void init()
          Init the factory.
 EJBResponse localCall(long hash, java.lang.Object[] methodArgs, java.lang.Long beanId)
          Do a local call on a method of this factory.
 EJBResponse rpcInvoke(EJBRequest request)
          A remote request comes to the bean factory and needs to be handled.
A response is done which contains the answer.
 void setJavaContext(javax.naming.Context javaContext)
          Sets the java: context.
 void stop()
          Stops the factory.
 

Method Detail

rpcInvoke

EJBResponse rpcInvoke(EJBRequest request)
A remote request comes to the bean factory and needs to be handled.
A response is done which contains the answer.

Parameters:
request - the EJB request.
Returns:
a response that have been processed by the factory.

localCall

EJBResponse localCall(long hash,
                      java.lang.Object[] methodArgs,
                      java.lang.Long beanId)
Do a local call on a method of this factory.

Parameters:
hash - the hash of the method to execute.
methodArgs - the arguments of the method
beanId - the id of the bean that we want (stateful).
Returns:
response container new id (if any) and value.

init

void init()
          throws FactoryException
Init the factory.

Throws:
FactoryException - if the initialization fails.

stop

void stop()
Stops the factory.


getContainer

EZBContainer getContainer()
Gets the container used by this factory.

Returns:
container of this factory

getJavaContext

javax.naming.Context getJavaContext()
Gets the java: context.

Returns:
java: context.

setJavaContext

void setJavaContext(javax.naming.Context javaContext)
Sets the java: context.

Parameters:
javaContext - the java: context.

getBeanInfo

IBeanInfo getBeanInfo()
Gets the bean information.

Returns:
bean information