org.jboss.web.tomcat.service.session.distributedcache.impl.jbc
Class SipCacheListener

java.lang.Object
  extended by org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase
      extended by org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.SipCacheListener

public class SipCacheListener
extends org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase

Listens for distributed caches events, notifying the JBossCacheManager of events of interest.

Author:
Brian Stansberry, Jean Deruelle

Field Summary
protected static int BUDDY_BACKUP_ROOT_OWNER_INDEX
           
protected static int BUDDY_BACKUP_ROOT_OWNER_SIZE
           
protected static int HOSTNAME_FQN_INDEX
           
protected static org.jboss.logging.Logger logger
           
protected static int SIPAPPNAME_FQN_INDEX
           
protected static int SIPAPPSESSION_FQN_SIZE
           
protected static int SIPAPPSESSION_ID_FQN_INDEX
           
protected static int SIPAPPSESSION_POJO_ATTRIBUTE_FQN_INDEX
           
protected static int SIPAPPSESSION_POJO_INTERNAL_FQN_INDEX
           
protected static int SIPAPPSESSION_POJO_INTERNAL_FQN_SIZE
           
protected static int SIPAPPSESSION_POJO_KEY_FQN_INDEX
           
protected static int SIPAPPSESSION_POJO_KEY_FQN_SIZE
           
protected static int SIPSESSION_FQN_INDEX
           
protected static int SIPSESSION_FQN_SIZE
           
protected static int SIPSESSION_ID_FQN_INDEX
           
protected static int SIPSESSION_POJO_ATTRIBUTE_FQN_INDEX
           
protected static int SIPSESSION_POJO_INTERNAL_FQN_INDEX
           
protected static int SIPSESSION_POJO_INTERNAL_FQN_SIZE
           
protected static int SIPSESSION_POJO_KEY_FQN_INDEX
           
protected static int SIPSESSION_POJO_KEY_FQN_SIZE
           
 
Fields inherited from class org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase
manager_, SESSION_ID_FQN_INDEX
 
Method Summary
protected static java.lang.String getSipApplicationSessionIdFromFqn(org.jboss.cache.Fqn fqn, boolean isBuddy)
           
protected static java.lang.String getSipSessionIdFromFqn(org.jboss.cache.Fqn fqn, boolean isBuddy)
           
protected  boolean isFqnForOurSipapp(org.jboss.cache.Fqn<java.lang.String> fqn, boolean isBuddy)
           
protected static boolean isFqnSessionRootSized(int size, boolean isBuddy)
           
protected static boolean isFqnSipApplicationSessionRootSized(int size, boolean isBuddy)
           
static boolean isPossibleSipApplicationSessionInternalPojoFqn(org.jboss.cache.Fqn<java.lang.String> fqn)
          Check if the fqn is big enough to be in the internal pojo area but isn't in the regular attribute area.
static boolean isPossibleSipSessionInternalPojoFqn(org.jboss.cache.Fqn<java.lang.String> fqn)
          Check if the fqn is big enough to be in the internal pojo area but isn't in the regular attribute area.
 void nodeCreated(org.jboss.cache.notifications.event.NodeCreatedEvent event)
           
 void nodeModified(org.jboss.cache.notifications.event.NodeModifiedEvent event)
           
 void nodeRemoved(org.jboss.cache.notifications.event.NodeRemovedEvent event)
           
 
Methods inherited from class org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase
getBuddyOwner, getIdFromFqn, isBuddyFqn, isFqnForOurWebapp, isFqnSessionRootSized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.jboss.logging.Logger logger

SIPSESSION_FQN_INDEX

protected static final int SIPSESSION_FQN_INDEX
See Also:
Constant Field Values

HOSTNAME_FQN_INDEX

protected static final int HOSTNAME_FQN_INDEX
See Also:
Constant Field Values

SIPAPPNAME_FQN_INDEX

protected static final int SIPAPPNAME_FQN_INDEX
See Also:
Constant Field Values

SIPAPPSESSION_ID_FQN_INDEX

protected static final int SIPAPPSESSION_ID_FQN_INDEX
See Also:
Constant Field Values

SIPSESSION_ID_FQN_INDEX

protected static final int SIPSESSION_ID_FQN_INDEX
See Also:
Constant Field Values

SIPAPPSESSION_FQN_SIZE

protected static final int SIPAPPSESSION_FQN_SIZE
See Also:
Constant Field Values

SIPAPPSESSION_POJO_ATTRIBUTE_FQN_INDEX

protected static final int SIPAPPSESSION_POJO_ATTRIBUTE_FQN_INDEX
See Also:
Constant Field Values

SIPSESSION_FQN_SIZE

protected static final int SIPSESSION_FQN_SIZE
See Also:
Constant Field Values

SIPSESSION_POJO_ATTRIBUTE_FQN_INDEX

protected static final int SIPSESSION_POJO_ATTRIBUTE_FQN_INDEX
See Also:
Constant Field Values

SIPAPPSESSION_POJO_KEY_FQN_INDEX

protected static final int SIPAPPSESSION_POJO_KEY_FQN_INDEX
See Also:
Constant Field Values

SIPAPPSESSION_POJO_KEY_FQN_SIZE

protected static final int SIPAPPSESSION_POJO_KEY_FQN_SIZE
See Also:
Constant Field Values

SIPSESSION_POJO_KEY_FQN_INDEX

protected static final int SIPSESSION_POJO_KEY_FQN_INDEX
See Also:
Constant Field Values

SIPSESSION_POJO_KEY_FQN_SIZE

protected static final int SIPSESSION_POJO_KEY_FQN_SIZE
See Also:
Constant Field Values

BUDDY_BACKUP_ROOT_OWNER_INDEX

protected static final int BUDDY_BACKUP_ROOT_OWNER_INDEX

BUDDY_BACKUP_ROOT_OWNER_SIZE

protected static final int BUDDY_BACKUP_ROOT_OWNER_SIZE

SIPSESSION_POJO_INTERNAL_FQN_INDEX

protected static final int SIPSESSION_POJO_INTERNAL_FQN_INDEX
See Also:
Constant Field Values

SIPSESSION_POJO_INTERNAL_FQN_SIZE

protected static final int SIPSESSION_POJO_INTERNAL_FQN_SIZE
See Also:
Constant Field Values

SIPAPPSESSION_POJO_INTERNAL_FQN_INDEX

protected static final int SIPAPPSESSION_POJO_INTERNAL_FQN_INDEX
See Also:
Constant Field Values

SIPAPPSESSION_POJO_INTERNAL_FQN_SIZE

protected static final int SIPAPPSESSION_POJO_INTERNAL_FQN_SIZE
See Also:
Constant Field Values
Method Detail

isFqnForOurSipapp

protected boolean isFqnForOurSipapp(org.jboss.cache.Fqn<java.lang.String> fqn,
                                    boolean isBuddy)

nodeCreated

public void nodeCreated(org.jboss.cache.notifications.event.NodeCreatedEvent event)

nodeRemoved

public void nodeRemoved(org.jboss.cache.notifications.event.NodeRemovedEvent event)

nodeModified

public void nodeModified(org.jboss.cache.notifications.event.NodeModifiedEvent event)

isFqnSessionRootSized

protected static boolean isFqnSessionRootSized(int size,
                                               boolean isBuddy)

isFqnSipApplicationSessionRootSized

protected static boolean isFqnSipApplicationSessionRootSized(int size,
                                                             boolean isBuddy)

getSipApplicationSessionIdFromFqn

protected static java.lang.String getSipApplicationSessionIdFromFqn(org.jboss.cache.Fqn fqn,
                                                                    boolean isBuddy)

getSipSessionIdFromFqn

protected static java.lang.String getSipSessionIdFromFqn(org.jboss.cache.Fqn fqn,
                                                         boolean isBuddy)

isPossibleSipSessionInternalPojoFqn

public static boolean isPossibleSipSessionInternalPojoFqn(org.jboss.cache.Fqn<java.lang.String> fqn)
Check if the fqn is big enough to be in the internal pojo area but isn't in the regular attribute area. Structure in the cache is: /SIPSESSION ++ /contextPath_hostname ++++ /sipApplicationName ++++++ /id ++++++++ /sipsessionid ++++++++++ /ATTRIBUTE ++++++++++ /_JBossInternal_ ++++++++++++ etc etc If the Fqn size is big enough to be "etc etc" or lower, but the 4th level is not "ATTRIBUTE", it must be under _JBossInternal_. We discriminate based on != ATTRIBUTE to avoid having to code to the internal PojoCache _JBossInternal_ name.

Parameters:
fqn -
Returns:

isPossibleSipApplicationSessionInternalPojoFqn

public static boolean isPossibleSipApplicationSessionInternalPojoFqn(org.jboss.cache.Fqn<java.lang.String> fqn)
Check if the fqn is big enough to be in the internal pojo area but isn't in the regular attribute area. Structure in the cache is: /SIPSESSION ++ /contextPath_hostname ++++ /sipApplicationName ++++++ /id ++++++++ /ATTRIBUTE ++++++++ /_JBossInternal_ ++++++++++ etc etc If the Fqn size is big enough to be "etc etc" or lower, but the 4th level is not "ATTRIBUTE", it must be under _JBossInternal_. We discriminate based on != ATTRIBUTE to avoid having to code to the internal PojoCache _JBossInternal_ name.

Parameters:
fqn -
Returns:


Copyright © 2010. All Rights Reserved.