|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.container.AbsFactory
org.objectweb.easybeans.container.session.SessionFactory<PoolType>
PoolType
- the type of bean instance.public abstract class SessionFactory<PoolType>
This class manages the session bean and its creation/lifecycle.
Field Summary | |
---|---|
private java.lang.Class<PoolType> |
beanClass
Class used to build bean's instance. |
private java.lang.String |
className
Name of the class of the managed bean. |
private EZBContainer |
container
Container that created this factory. |
private java.util.Map<java.lang.Long,java.lang.reflect.Method> |
hashes
Keep a direct reference to the method so that we don't need to compute each time the method object to invoke. http://java.sun.com/j2se/1.5.0/docs/guide/rmi/spec/rmi-stubs24.html |
private static JLog |
logger
Logger. |
private Pool<PoolType,java.lang.Long> |
pool
Pool that manage beans instance. |
Constructor Summary | |
---|---|
SessionFactory(java.lang.String className,
EZBContainer container)
Builds a new factory with a given name and its container. |
Method Summary | |
---|---|
protected java.lang.Class<PoolType> |
getBeanClass()
Gets the bean's class. |
java.lang.String |
getClassName()
Gets the className used by this factory. |
EZBContainer |
getContainer()
Gets the container used by this factory. |
protected java.util.Map<java.lang.Long,java.lang.reflect.Method> |
getHashes()
Gets the computed hashes. |
protected Pool<PoolType,java.lang.Long> |
getPool()
Gets the pool used by this factory. |
protected void |
setBeanClass(java.lang.Class<PoolType> beanClass)
Sets the bean class that will be used to build bean's instance. |
protected void |
setHashes(java.util.Map<java.lang.Long,java.lang.reflect.Method> hashes)
Sets the hashes for the current bean class. |
protected void |
setPool(Pool<PoolType,java.lang.Long> pool)
Sets the pool used by this factory. |
void |
stop()
Stops the factory. |
Methods inherited from class org.objectweb.easybeans.container.AbsFactory |
---|
rpcInvoke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static JLog logger
private java.lang.String className
private EZBContainer container
private java.util.Map<java.lang.Long,java.lang.reflect.Method> hashes
private Pool<PoolType,java.lang.Long> pool
private java.lang.Class<PoolType> beanClass
Constructor Detail |
---|
public SessionFactory(java.lang.String className, EZBContainer container) throws FactoryException
className
- name of this factory (name of class that is managed)container
- the root component of this factory.
FactoryException
- if class can't be loaded.Method Detail |
---|
protected java.lang.Class<PoolType> getBeanClass()
protected void setBeanClass(java.lang.Class<PoolType> beanClass)
beanClass
- the instance of the bean class nameprotected void setPool(Pool<PoolType,java.lang.Long> pool)
pool
- the pool which managed bean instancesprotected java.util.Map<java.lang.Long,java.lang.reflect.Method> getHashes()
protected void setHashes(java.util.Map<java.lang.Long,java.lang.reflect.Method> hashes)
hashes
- method hashes computed as RMI hashespublic void stop()
public EZBContainer getContainer()
public java.lang.String getClassName()
protected Pool<PoolType,java.lang.Long> getPool()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |