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

java.lang.Object
  extended by org.mobicents.servlet.sip.core.session.SipSessionImpl
      extended by org.jboss.web.tomcat.service.session.ClusteredSipSession
          extended by org.jboss.web.tomcat.service.session.JBossCacheClusteredSipSession
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, SipSession, MobicentsSipSession
Direct Known Subclasses:
AttributeBasedClusteredSipSession, FieldBasedClusteredSipSession, SessionBasedClusteredSipSession

public abstract class JBossCacheClusteredSipSession
extends ClusteredSipSession

Common superclass of ClusteredSipSession 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.SipSessionImpl
SipSessionImpl.SipSessionEventType
 
Nested classes/interfaces inherited from interface javax.servlet.sip.SipSession
SipSession.State
 
Field Summary
protected  ConvergedJBossCacheService proxy_
          Our proxy to the cache.
 
Fields inherited from class org.jboss.web.tomcat.service.session.ClusteredSipSession
alwaysReplicateMetadata, excludedAttributes, firstAccess, hasActivationListener, info, invalidationPolicy, isSessionModifiedSinceLastSave, lastReplicated, maxUnreplicatedFactor, maxUnreplicatedInterval, outdatedTime, outdatedVersion, replicationExcludes, sessionAttributesDirty, sessionMetadataDirty, sipAppSessionParentKey, sm, version
 
Fields inherited from class org.mobicents.servlet.sip.core.session.SipSessionImpl
b2buaHelper, creationTime, derivedSipSessions, executorService, handlerServlet, invalidateWhenReady, isValid, key, lastAccessedTime, localParty, okToByeSentOrReceived, ongoingTransactions, originalTransaction, outboundInterface, parentSession, proxy, readyToInvalidate, remoteParty, routingRegion, sessionCreatingDialog, sessionCreatingTransaction, sipApplicationSession, sipFactory, sipSessionAttributeMap, state, stateInfo, subscriberURI, subscriptions, userPrincipal
 
Constructor Summary
protected JBossCacheClusteredSipSession(SipSessionKey key, SipFactoryImpl sipFactoryImpl, MobicentsSipApplicationSession mobicentsSipApplicationSession)
           
 
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 ClusteredSipSession.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.ClusteredSipSession
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, setMaxUnreplicatedInterval, setOutdatedVersion, setPrincipal, setVersion, toString, updateAccessTimeFromOutdatedTime, updateLastReplicated, writeExternal
 
Methods inherited from class org.mobicents.servlet.sip.core.session.SipSessionImpl
addDerivedSipSessions, addOngoingTransaction, addSubscription, createRequest, findDerivedSipSession, getApplicationSession, getB2buaHelper, getCallId, getCreationTime, getDerivedSipSessions, getExecutorService, getHandler, getId, getInvalidateWhenReady, getKey, getLastAccessedTime, getLocalParty, getOngoingTransactions, getOutboundInterface, getProxy, getRegion, getRegionInternal, getRemoteParty, getServletContext, getSessionCreatingDialog, getSessionCreatingTransaction, getSipApplicationSession, getSipSessionAttributeMap, getSipSubscriberURI, getState, getStateInfo, getSubscriberURI, getUserPrincipal, hasOngoingTransaction, invalidate, isReadyToInvalidate, isSupervisedMode, onDialogTimeout, onReadyToInvalidate, onTerminatedState, removeAttribute, removeDerivedSipSession, removeOngoingTransaction, removeSubscription, setB2buaHelper, setHandler, setInvalidateWhenReady, setKey, setLocalParty, setOutboundInterface, setOutboundInterface, setParentSession, setProxy, setRemoteParty, setRoutingRegion, setSessionCreatingDialog, setSessionCreatingTransaction, setSipApplicationSession, setSipSessionAttributeMap, setSipSubscriberURI, setState, setStateInfo, setUserPrincipal, updateStateOnResponse, updateStateOnSubsequentRequest
 
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

JBossCacheClusteredSipSession

protected JBossCacheClusteredSipSession(SipSessionKey key,
                                        SipFactoryImpl sipFactoryImpl,
                                        MobicentsSipApplicationSession mobicentsSipApplicationSession)
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 ClusteredSipSession
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 ClusteredSipSession

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 ClusteredSipSession
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: ClusteredSipSession
Exists in this class solely to act as an API-compatible bridge to the deprecated ClusteredSipSession.removeJBossInternalAttribute(String). JBossCacheClusteredSession subclasses will override this to call their own methods that make use of localCall and localOnly

Overrides:
removeAttributeInternal in class ClusteredSipSession
Returns:

removeJBossInternalAttribute

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

removeJBossInternalAttribute

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


Copyright © 2009. All Rights Reserved.