org.jboss.web.tomcat.service.session
Class JBossCacheClusteredSipApplicationSession

java.lang.Object
  extended by org.mobicents.servlet.sip.core.session.SipApplicationSessionImpl
      extended by org.jboss.web.tomcat.service.session.ClusteredSipApplicationSession
          extended by org.jboss.web.tomcat.service.session.JBossCacheClusteredSipApplicationSession
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, SipApplicationSession, MobicentsSipApplicationSession
Direct Known Subclasses:
AttributeBasedClusteredSipApplicationSession, FieldBasedClusteredSipApplicationSession, SessionBasedClusteredSipApplicationSession

public abstract class JBossCacheClusteredSipApplicationSession
extends ClusteredSipApplicationSession

Common superclass of ClusteredSipApplicationSession types that use JBossCache as their distributed cache.

Author:
Jean Deruelle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mobicents.servlet.sip.core.session.SipApplicationSessionImpl
SipApplicationSessionImpl.SipApplicationSessionTimerTask
 
Nested classes/interfaces inherited from interface javax.servlet.sip.SipApplicationSession
SipApplicationSession.Protocol
 
Field Summary
protected  ConvergedJBossCacheService proxy_
          Our proxy to the cache.
 
Fields inherited from class org.jboss.web.tomcat.service.session.ClusteredSipApplicationSession
excludedAttributes, firstAccess, futureExpirationTimeOnPassivation, hasActivationListener, httpSessionsOnPassivation, info, invalidationPolicy, isSessionModifiedSinceLastSave, lastReplicated, maxUnreplicatedFactor, maxUnreplicatedInterval, outdatedTime, outdatedVersion, replicationExcludes, sessionAttributesDirty, sessionMetadataDirty, sipSessionsOnPassivation, sm, version
 
Fields inherited from class org.mobicents.servlet.sip.core.session.SipApplicationSessionImpl
creationTime, currentRequestHandler, expirationTimerFuture, expirationTimerTask, expired, httpSessions, invalidateWhenReady, isValid, key, lastAccessedTime, readyToInvalidate, servletTimers, sipApplicationSessionAttributeMap, sipContext, sipSessions
 
Fields inherited from interface org.mobicents.servlet.sip.core.session.MobicentsSipApplicationSession
SIP_APPLICATION_KEY_PARAM_NAME
 
Constructor Summary
protected JBossCacheClusteredSipApplicationSession(SipApplicationSessionKey key, SipContext sipContext)
           
 
Method Summary
protected  void establishProxy()
          Gets a reference to the JBossCacheService.
 void initAfterLoad(JBossCacheSipManager manager)
          Initialize fields marked as transient after loading this session from the distributed store
protected abstract  void populateAttributes()
           
 void processSessionRepl()
          Increment our version and place ourself in the cache.
protected  java.lang.Object removeAttributeInternal(java.lang.String name, boolean localCall, boolean localOnly)
          Exists in this class solely to act as an API-compatible bridge to the deprecated ClusteredSipApplicationSession.removeJBossInternalAttribute(String).
protected  void removeFromManager(boolean localCall, boolean localOnly)
          Overrides the superclass impl by doing nothing if localCall is false.
protected  java.lang.Object removeJBossInternalAttribute(java.lang.String name)
           
protected abstract  java.lang.Object removeJBossInternalAttribute(java.lang.String name, boolean localCall, boolean localOnly)
           
 
Methods inherited from class org.jboss.web.tomcat.service.session.ClusteredSipApplicationSession
access, activate, canAttributeBeReplicated, clearOutdated, expire, expire, getAttribute, getAttributeInternal, getAttributeNames, getAttributesInternal, getExceedsMaxUnreplicatedInterval, getJBossInternalAttribute, getJBossInternalAttributes, getLastReplicated, getMaxUnreplicatedFactor, getMaxUnreplicatedInterval, getReplicateSessionBody, getSessionAttributesDirty, getSessionMetadataDirty, getUseJK, getVersion, incrementVersion, isGetDirty, isMutable, isNewData, isOutdated, isSessionDirty, isValid, isValid, keys, passivate, readExternal, removeAttributeInternal, removeAttributeInternal, removeExcludedAttributes, removeMyself, removeMyselfLocal, sessionAttributesDirty, sessionDirty, sessionMetadataDirty, setAttribute, setInternalAttribute, setIsOutdated, setJBossInternalAttribute, setMaxUnreplicatedFactor, setOutdatedVersion, setVersion, toString, updateAccessTimeFromOutdatedTime, updateLastReplicated, writeExternal
 
Methods inherited from class org.mobicents.servlet.sip.core.session.SipApplicationSessionImpl
addHttpSession, addServletTimer, addSipSession, encodeURI, encodeURL, findHttpSession, getApplicationName, getCreationTime, getCurrentRequestHandler, getExpirationTime, getId, getInvalidateWhenReady, getKey, getLastAccessedTime, getSession, getSessions, getSessions, getSipContext, getSipSession, getTimer, getTimers, hasTimerListener, invalidate, isExpired, isReadyToInvalidate, notifySipApplicationSessionListeners, onSipSessionReadyToInvalidate, removeAttribute, removeHttpSession, removeServletTimer, removeSipSession, setCurrentRequestHandler, setExpired, setExpires, setInvalidateWhenReady, setKey, tryToInvalidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

proxy_

protected transient ConvergedJBossCacheService proxy_
Our proxy to the cache.

Constructor Detail

JBossCacheClusteredSipApplicationSession

protected JBossCacheClusteredSipApplicationSession(SipApplicationSessionKey key,
                                                   SipContext sipContext)
Method Detail

initAfterLoad

public void initAfterLoad(JBossCacheSipManager manager)
Initialize fields marked as transient after loading this session from the distributed store

Specified by:
initAfterLoad in class ClusteredSipApplicationSession
Parameters:
manager - the manager for this session

establishProxy

protected void establishProxy()
Gets a reference to the JBossCacheService.


populateAttributes

protected abstract void populateAttributes()

processSessionRepl

public void processSessionRepl()
Increment our version and place ourself in the cache.

Specified by:
processSessionRepl in class ClusteredSipApplicationSession

removeFromManager

protected void removeFromManager(boolean localCall,
                                 boolean localOnly)
Overrides the superclass impl by doing nothing if localCall is false. The JBossCacheManager will already be aware of a remote invalidation and will handle removal itself.

Overrides:
removeFromManager in class ClusteredSipApplicationSession
Parameters:
localCall - whether this call originated from local activity or from a remote invalidation. In this default implementation, this parameter is ignored.
localOnly - whether the rest of the cluster should be made aware of the removal

removeAttributeInternal

protected java.lang.Object removeAttributeInternal(java.lang.String name,
                                                   boolean localCall,
                                                   boolean localOnly)
Description copied from class: ClusteredSipApplicationSession
Exists in this class solely to act as an API-compatible bridge to the deprecated ClusteredSipApplicationSession.removeJBossInternalAttribute(String). JBossCacheClusteredSession subclasses will override this to call their own methods that make use of localCall and localOnly

Overrides:
removeAttributeInternal in class ClusteredSipApplicationSession
Returns:

removeJBossInternalAttribute

protected java.lang.Object removeJBossInternalAttribute(java.lang.String name)
Specified by:
removeJBossInternalAttribute in class ClusteredSipApplicationSession

removeJBossInternalAttribute

protected abstract java.lang.Object removeJBossInternalAttribute(java.lang.String name,
                                                                 boolean localCall,
                                                                 boolean localOnly)


Copyright © 2008. All Rights Reserved.