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

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


org.jboss.ha.httpsession.beanimpl.interfaces
Interface ClusteredHTTPSessionBusiness

All Known Subinterfaces:
ClusteredHTTPSession, LocalClusteredHTTPSession
All Known Implementing Classes:
ClusteredHTTPSessionBeanAbstract

public interface ClusteredHTTPSessionBusiness

Business methods for the entity bean that will store HTTPSession in a clustered environment.

Version:
$Revision: 1.2 $

Revisions:

31. d锟絚embre 2001 Sacha Labourey:

  • First implementation
Author:
Sacha Labourey.
See Also:
ClusteredHTTPSession

Method Summary
 long getCreationTime()
          Return the time when this session has been created in miliseconds since 1970.
 long getLastAccessedTime()
          Return the last time this session has been accessed in miliseconds since 1970.
 SerializableHttpSession getSession()
          Return the HttpSession object associated to its id.
 String getSessionId()
          Get the session identifier associated to this HTTPSession.
 void setSession(SerializableHttpSession session)
          Associate a new session (set of attributes, ...) to this id.
 

Method Detail

getSessionId

public String getSessionId()
                    throws RemoteException
Get the session identifier associated to this HTTPSession. This is the primary key of the entity bean.

Returns:
The session id.
Throws:
RemoteException

getSession

public SerializableHttpSession getSession()
                                   throws RemoteException
Return the HttpSession object associated to its id. The main difference with the standard class is that this one is Serializable.

Throws:
RemoteException

setSession

public void setSession(SerializableHttpSession session)
                throws RemoteException
Associate a new session (set of attributes, ...) to this id.

Throws:
RemoteException

getLastAccessedTime

public long getLastAccessedTime()
                         throws RemoteException
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.

Throws:
RemoteException

getCreationTime

public long getCreationTime()
                     throws RemoteException
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)

Throws:
RemoteException


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