|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.servlet.sip.core.session.SipApplicationSessionImpl
org.jboss.web.tomcat.service.session.ClusteredSipApplicationSession
org.jboss.web.tomcat.service.session.JBossCacheClusteredSipApplicationSession
org.jboss.web.tomcat.service.session.FieldBasedClusteredSipApplicationSession
public class FieldBasedClusteredSipApplicationSession
Implementation of a clustered sip application 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.
/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.SipApplicationSessionImpl |
|---|
SipApplicationSessionImpl.SipApplicationSessionTimerTask |
| Nested classes/interfaces inherited from interface javax.servlet.sip.SipApplicationSession |
|---|
SipApplicationSession.Protocol |
| 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.JBossCacheClusteredSipApplicationSession |
|---|
proxy_ |
| Fields inherited from class org.jboss.web.tomcat.service.session.ClusteredSipApplicationSession |
|---|
alwaysReplicateMetadata, excludedAttributes, firstAccess, futureExpirationTimeOnPassivation, hasActivationListener, httpSessionsOnPassivation, 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, executorService, 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 |
FieldBasedClusteredSipApplicationSession(SipApplicationSessionKey key,
SipContext sipContext)
|
| 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.JBossCacheClusteredSipApplicationSession |
|---|
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 FieldBasedClusteredSipApplicationSession(SipApplicationSessionKey key,
SipContext sipContext)
| Method Detail |
|---|
public java.lang.String toString()
toString in class ClusteredSipApplicationSessionpublic void removeMyself()
ClusteredSipApplicationSession
removeMyself in class ClusteredSipApplicationSessionpublic void removeMyselfLocal()
ClusteredSipApplicationSession
removeMyselfLocal in class ClusteredSipApplicationSessionprotected void populateAttributes()
populateAttributes in class JBossCacheClusteredSipApplicationSessionprotected java.lang.Object getJBossInternalAttribute(java.lang.String name)
getJBossInternalAttribute in class ClusteredSipApplicationSessionprotected boolean isMutable(java.lang.Object attribute)
isMutable in class ClusteredSipApplicationSession
protected java.lang.Object removeJBossInternalAttribute(java.lang.String name,
boolean localCall,
boolean localOnly)
removeJBossInternalAttribute in class JBossCacheClusteredSipApplicationSessionprotected java.util.Map getJBossInternalAttributes()
getJBossInternalAttributes in class ClusteredSipApplicationSessionprotected java.util.Set getJBossInternalKeys()
protected java.lang.String[] keys()
keys in class ClusteredSipApplicationSessionprotected boolean canAttributeBeReplicated(java.lang.Object attribute)
canAttributeBeReplicated in class ClusteredSipApplicationSessionattribute - 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 ClusteredSipApplicationSessionkey - 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 | |||||||||