站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

ClusteredHTTPSessionBeanAbstract (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.ha.httpsession.beanimpl.ejb
Class ClusteredHTTPSessionBeanAbstract

java.lang.Object
  extended byorg.jboss.ha.httpsession.beanimpl.ejb.ClusteredHTTPSessionBeanAbstract
All Implemented Interfaces:
ClusteredHTTPSessionBusiness, javax.ejb.EnterpriseBean, javax.ejb.EntityBean, Serializable
Direct Known Subclasses:
ClusteredHTTPSessionBeanImpl

public abstract class ClusteredHTTPSessionBeanAbstract
extends Object
implements javax.ejb.EntityBean, ClusteredHTTPSessionBusiness

Abstract default implementation of the Clustered HTTP session for servlets.

Version:
$Revision: 1.3 $

Revisions:

31. decembre 2001 Sacha Labourey:

  • First implementation
Author:
Sacha Labourey.
See Also:
ClusteredHTTPSession, ClusteredHTTPSessionBusiness, ClusteredHTTPSessionHome, Serialized Form

Field Summary
protected  javax.ejb.EntityContext ejbContext
           
 
Constructor Summary
ClusteredHTTPSessionBeanAbstract()
           
 
Method Summary
 void ejbActivate()
           
 String ejbCreate(String sessionId)
           
 String ejbCreate(String sessionId, SerializableHttpSession session)
           
 void ejbLoad()
           
 void ejbPassivate()
           
 void ejbPostCreate(String sessionId)
           
 void ejbPostCreate(String sessionId, SerializableHttpSession session)
           
 void ejbRemove()
           
 void ejbStore()
           
abstract  long getCreationTime()
          Return the time when this session has been created in miliseconds since 1970.
protected  javax.ejb.EntityContext getEntityContext()
           
abstract  long getLastAccessedTime()
          Return the last time this session has been accessed in miliseconds since 1970.
abstract  Serializable getSerializedSession()
           
abstract  SerializableHttpSession getSession()
          Return the HttpSession object associated to its id.
abstract  String getSessionId()
          Get the session identifier associated to this HTTPSession.
abstract  boolean isModified()
           
abstract  void setCreationTime(long value)
           
 void setEntityContext(javax.ejb.EntityContext ctx)
           
abstract  void setLastAccessedTime(long value)
           
abstract  void setSerializedSession(Serializable session)
           
abstract  void setSession(SerializableHttpSession session)
          Associate a new session (set of attributes, ...) to this id.
abstract  void setSessionId(String sessionId)
           
 void unsetEntityContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ejbContext

protected javax.ejb.EntityContext ejbContext
Constructor Detail

ClusteredHTTPSessionBeanAbstract

public ClusteredHTTPSessionBeanAbstract()
Method Detail

ejbCreate

public String ejbCreate(String sessionId)
                 throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

ejbPostCreate

public void ejbPostCreate(String sessionId)
                   throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

ejbCreate

public String ejbCreate(String sessionId,
                        SerializableHttpSession session)
                 throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

ejbPostCreate

public void ejbPostCreate(String sessionId,
                          SerializableHttpSession session)
                   throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

isModified

public abstract boolean isModified()

ejbStore

public void ejbStore()
              throws javax.ejb.EJBException,
                     RemoteException
Specified by:
ejbStore in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        RemoteException
Specified by:
ejbActivate in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         RemoteException
Specified by:
ejbPassivate in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

ejbLoad

public void ejbLoad()
             throws javax.ejb.EJBException,
                    RemoteException
Specified by:
ejbLoad in interface javax.ejb.EntityBean
Throws:
javax.ejb.EJBException
RemoteException

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
Specified by:
setEntityContext in interface javax.ejb.EntityBean

ejbRemove

public void ejbRemove()
               throws javax.ejb.RemoveException,
                      javax.ejb.EJBException,
                      RemoteException
Specified by:
ejbRemove in interface javax.ejb.EntityBean
Throws:
javax.ejb.RemoveException
javax.ejb.EJBException
RemoteException

unsetEntityContext

public void unsetEntityContext()
Specified by:
unsetEntityContext in interface javax.ejb.EntityBean

getSessionId

public abstract String getSessionId()
Description copied from interface: ClusteredHTTPSessionBusiness
Get the session identifier associated to this HTTPSession. This is the primary key of the entity bean.

Specified by:
getSessionId in interface ClusteredHTTPSessionBusiness
Returns:
The session id.

setSessionId

public abstract void setSessionId(String sessionId)

getSerializedSession

public abstract Serializable getSerializedSession()

setSerializedSession

public abstract void setSerializedSession(Serializable session)

getLastAccessedTime

public abstract long getLastAccessedTime()
Description copied from interface: ClusteredHTTPSessionBusiness
Return the last time this session has been accessed in miliseconds since 1970. This method is a shortcut for getSession().getLastAccessedTime (). The reason is that the bean, when directly asked for the time, don't need to deserialize the session representation if not already done (lazy deserialization). If the only thing that changes in an HTTPSession it the last accessed time (and no attributes), the session may not be replicated on other node (to reduce traffic). Nevertheless, the new session is stored in the local bean. Consequently, if a load-balancer with sticky sessions is used, this is no problem (the local, updated, bean is used.

Specified by:
getLastAccessedTime in interface ClusteredHTTPSessionBusiness

setLastAccessedTime

public abstract void setLastAccessedTime(long value)

getCreationTime

public abstract long getCreationTime()
Description copied from interface: ClusteredHTTPSessionBusiness
Return the time when this session has been created in miliseconds since 1970. This method is a shortcut for getSession().getLastAccessedTime (). The reason is that the bean, when directly asked for the time, don't need to deserialize the session representation if not already done (lazy deserialization)

Specified by:
getCreationTime in interface ClusteredHTTPSessionBusiness

setCreationTime

public abstract void setCreationTime(long value)

getSession

public abstract SerializableHttpSession getSession()
                                            throws javax.ejb.EJBException
Description copied from interface: ClusteredHTTPSessionBusiness
Return the HttpSession object associated to its id. The main difference with the standard class is that this one is Serializable.

Specified by:
getSession in interface ClusteredHTTPSessionBusiness
Throws:
javax.ejb.EJBException

setSession

public abstract void setSession(SerializableHttpSession session)
Description copied from interface: ClusteredHTTPSessionBusiness
Associate a new session (set of attributes, ...) to this id.

Specified by:
setSession in interface ClusteredHTTPSessionBusiness

getEntityContext

protected javax.ejb.EntityContext getEntityContext()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.