|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.servlet.sip.core.session.SipSessionImpl
org.jboss.web.tomcat.service.session.ClusteredSipSession
org.jboss.web.tomcat.service.session.JBossCacheClusteredSipSession
org.jboss.web.tomcat.service.session.FieldBasedClusteredSipSession
public class FieldBasedClusteredSipSession
Implementation of a clustered sip session for the JBossCacheManager. This class is based on the following Jboss class org.jboss.web.tomcat.service.session.FieldBasedClusteredSession JBOSS AS 4.2.2 Tag The replication granularity level is field based; that is, we replicate only the dirty field in a POJO that is part of a session attribute. E.g., once a user do setAttribute("pojo", pojo), pojo will be monitored automatically for field changes and accessing. It offers couple of advantages:
We use JBossCache for our internal, replicated data store. The internal structure is like in JBossCache:
/SIPSESSION
/hostname
/sip_application_name (path + session id is unique)
/sipappsessionid Map(id, session)
(VERSION_KEY, version) // Used for version tracking. version is an Integer.
/sipsessionid Map(id, session)
(VERSION_KEY, version) // Used for version tracking. version is an Integer.
/ATTRIBUTE Map(can be empty)
/pojo Map(field name, field value) (pojo naming is by field.getName())
| 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 java.util.Map |
attributes_
|
protected static java.lang.String |
info
Descriptive information describing this Session implementation. |
| Fields inherited from class org.jboss.web.tomcat.service.session.JBossCacheClusteredSipSession |
|---|
proxy_ |
| Fields inherited from class org.jboss.web.tomcat.service.session.ClusteredSipSession |
|---|
alwaysReplicateMetadata, excludedAttributes, firstAccess, hasActivationListener, 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 |
FieldBasedClusteredSipSession(SipSessionKey key,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession mobicentsSipApplicationSession)
|
| Method Summary | |
|---|---|
protected boolean |
canAttributeBeReplicated(java.lang.Object attribute)
Overrides the superclass to allow instrumented classes and non-serializable Collections and Maps. |
void |
fireChange(org.jboss.aspects.patterns.observable.Subject subject)
Call back handler for the aop Subject/Observer pattern. |
protected java.lang.Object |
getJBossInternalAttribute(java.lang.String name)
|
protected java.util.Map |
getJBossInternalAttributes()
|
protected java.util.Set |
getJBossInternalKeys()
|
protected boolean |
isMutable(java.lang.Object attribute)
Overrides the superclass to treat classes implementing Subject as "immutable", since as an Observer we will detect any changes to those types. |
protected java.lang.String[] |
keys()
Method inherited from Tomcat. |
protected void |
populateAttributes()
Populate the attributes stored in the distributed store to the local transient map. |
protected java.lang.Object |
removeJBossInternalAttribute(java.lang.String name,
boolean localCall,
boolean localOnly)
|
void |
removeMyself()
Remove myself from the internal store. |
void |
removeMyselfLocal()
Remove myself from the |
protected java.lang.Object |
setJBossInternalAttribute(java.lang.String key,
java.lang.Object value)
This is the hook for setAttribute. |
java.lang.String |
toString()
Return a string representation of this object. |
| Methods inherited from class org.jboss.web.tomcat.service.session.JBossCacheClusteredSipSession |
|---|
establishProxy, initAfterLoad, processSessionRepl, removeAttributeInternal, removeFromManager, removeJBossInternalAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String info
protected transient java.util.Map attributes_
| Constructor Detail |
|---|
protected FieldBasedClusteredSipSession(SipSessionKey key,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession mobicentsSipApplicationSession)
| Method Detail |
|---|
public java.lang.String toString()
toString in class ClusteredSipSessionpublic void removeMyself()
ClusteredSipSession
removeMyself in class ClusteredSipSessionpublic void removeMyselfLocal()
ClusteredSipSession
removeMyselfLocal in class ClusteredSipSessionprotected void populateAttributes()
populateAttributes in class JBossCacheClusteredSipSessionprotected java.lang.Object getJBossInternalAttribute(java.lang.String name)
getJBossInternalAttribute in class ClusteredSipSessionprotected boolean isMutable(java.lang.Object attribute)
isMutable in class ClusteredSipSession
protected java.lang.Object removeJBossInternalAttribute(java.lang.String name,
boolean localCall,
boolean localOnly)
removeJBossInternalAttribute in class JBossCacheClusteredSipSessionprotected java.util.Map getJBossInternalAttributes()
getJBossInternalAttributes in class ClusteredSipSessionprotected java.util.Set getJBossInternalKeys()
protected java.lang.String[] keys()
keys in class ClusteredSipSessionprotected boolean canAttributeBeReplicated(java.lang.Object attribute)
canAttributeBeReplicated in class ClusteredSipSessionattribute - the attribute
true if attribute is null,
Serializable or an array of primitives.
protected java.lang.Object setJBossInternalAttribute(java.lang.String key,
java.lang.Object value)
setJBossInternalAttribute in class ClusteredSipSessionkey - value -
public void fireChange(org.jboss.aspects.patterns.observable.Subject subject)
fireChange in interface org.jboss.aspects.patterns.observable.Observersubject - the object we are Observing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||