com.caucho.ejb.session
Class AbstractSessionContext<X,T>

java.lang.Object
  extended by com.caucho.ejb.server.AbstractContext<X>
      extended by com.caucho.ejb.session.AbstractSessionContext<X,T>
All Implemented Interfaces:
EJBContext, SessionContext
Direct Known Subclasses:
SingletonContext, StatefulContext, StatelessContext

public abstract class AbstractSessionContext<X,T>
extends AbstractContext<X>
implements SessionContext

Abstract base class for an session context


Constructor Summary
protected AbstractSessionContext(AbstractSessionManager<X> manager, java.lang.Class<T> api)
           
 
Method Summary
 T createProxy(CreationalContextImpl<T> env)
           
 void destroy()
          Destroy the context.
 void destroyProxy(T instance, CreationalContextImpl<T> env)
           
 java.lang.Class<T> getApi()
           
<Z> Z
getBusinessObject(java.lang.Class<Z> businessInterface)
           
 EJBHome getEJBHome()
          Returns the EJBHome stub for the container.
 EJBLocalHome getEJBLocalHome()
          Returns the EJBLocalHome stub for the container.
 EJBLocalObject getEJBLocalObject()
           
 EJBObject getEJBObject()
           
 InjectManager getInjectManager()
           
 java.lang.Class<?> getInvokedBusinessInterface()
           
protected  T getLocal()
           
 MessageContext getMessageContext()
           
 InjectManager getModuleInjectManager()
           
protected  SessionProxyFactory<T> getProxyFactory()
           
 AbstractSessionManager<X> getServer()
          Returns the server which owns this bean.
 X newInstance(CreationalContextImpl<X> env)
           
 java.lang.String toString()
           
 boolean wasCancelCalled()
           
 
Methods inherited from class com.caucho.ejb.server.AbstractContext
__caucho_setInvokedBusinessInterface, __caucho_timeout_callback, __caucho_timeout_callback, __caucho_timeout_callback, getCallerIdentity, getCallerPrincipal, getContextData, getEJBMetaData, getEnvironment, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, isDead, lookup, setDeclaredRoles, setRollbackOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.ejb.EJBContext
getCallerIdentity, getCallerPrincipal, getContextData, getEnvironment, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setRollbackOnly
 

Constructor Detail

AbstractSessionContext

protected AbstractSessionContext(AbstractSessionManager<X> manager,
                                 java.lang.Class<T> api)
Method Detail

getServer

public AbstractSessionManager<X> getServer()
Description copied from class: AbstractContext
Returns the server which owns this bean.

Specified by:
getServer in class AbstractContext<X>

getInjectManager

public InjectManager getInjectManager()

getModuleInjectManager

public InjectManager getModuleInjectManager()

getApi

public java.lang.Class<T> getApi()

getInvokedBusinessInterface

public java.lang.Class<?> getInvokedBusinessInterface()
Specified by:
getInvokedBusinessInterface in interface SessionContext
Overrides:
getInvokedBusinessInterface in class AbstractContext<X>

createProxy

public T createProxy(CreationalContextImpl<T> env)

getProxyFactory

protected SessionProxyFactory<T> getProxyFactory()

destroyProxy

public void destroyProxy(T instance,
                         CreationalContextImpl<T> env)

newInstance

public X newInstance(CreationalContextImpl<X> env)

destroy

public void destroy()
             throws java.lang.Exception
Description copied from class: AbstractContext
Destroy the context.

Overrides:
destroy in class AbstractContext<X>
Throws:
java.lang.Exception

getEJBHome

public EJBHome getEJBHome()
Returns the EJBHome stub for the container.

Specified by:
getEJBHome in interface EJBContext
Overrides:
getEJBHome in class AbstractContext<X>

getEJBLocalHome

public EJBLocalHome getEJBLocalHome()
Returns the EJBLocalHome stub for the container.

Specified by:
getEJBLocalHome in interface EJBContext
Overrides:
getEJBLocalHome in class AbstractContext<X>

getMessageContext

public MessageContext getMessageContext()
Specified by:
getMessageContext in interface SessionContext

wasCancelCalled

public boolean wasCancelCalled()
Specified by:
wasCancelCalled in interface SessionContext

getBusinessObject

public <Z> Z getBusinessObject(java.lang.Class<Z> businessInterface)
                    throws java.lang.IllegalStateException
Specified by:
getBusinessObject in interface SessionContext
Throws:
java.lang.IllegalStateException

getLocal

protected T getLocal()

getEJBLocalObject

public EJBLocalObject getEJBLocalObject()
                                 throws java.lang.IllegalStateException
Specified by:
getEJBLocalObject in interface SessionContext
Throws:
java.lang.IllegalStateException

getEJBObject

public EJBObject getEJBObject()
                       throws java.lang.IllegalStateException
Specified by:
getEJBObject in interface SessionContext
Throws:
java.lang.IllegalStateException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object