org.jboss.web.tomcat.service.session.distributedcache.spi
Interface LocalDistributableSessionManager


public interface LocalDistributableSessionManager

Callback interface to allow the distributed caching layer to invoke upon the local session manager.

Version:
$Revision: $
Author:
Brian Stansberry

Method Summary
 ClassLoader getApplicationClassLoader()
          Get the classloader able to load application classes.
 String getContextName()
          Gets the name of the Tomcat Context.
 String getHostName()
          Gets the name of the application's virtual host.
 org.jboss.metadata.web.jboss.ReplicationConfig getReplicationConfig()
          Gets the web application metadata.
 boolean isPassivationEnabled()
          Gets whether the webapp is configured for passivation.
 void notifyLocalAttributeModification(String realId)
          Callback from the distributed cache notifying of a local modification to a session's attributes.
 void notifyRemoteInvalidation(String realId)
          Notifies the manager that a session in the distributed cache has been invalidated
 void sessionActivated()
          Notification that a previously passivated session has been activated.
 boolean sessionChangedInDistributedCache(String realId, String dataOwner, int distributedVersion, long timestamp, DistributableSessionMetadata metadata)
          Callback from the distributed cache to notify us that a session has been modified remotely.
 

Method Detail

isPassivationEnabled

boolean isPassivationEnabled()
Gets whether the webapp is configured for passivation.

Returns:
true if passivation is enabled

getContextName

String getContextName()
Gets the name of the Tomcat Context.

Returns:
the context name

getHostName

String getHostName()
Gets the name of the application's virtual host.

Returns:
the name of the host

getApplicationClassLoader

ClassLoader getApplicationClassLoader()
Get the classloader able to load application classes.

Returns:
the classloader. Will not return null

getReplicationConfig

org.jboss.metadata.web.jboss.ReplicationConfig getReplicationConfig()
Gets the web application metadata.

Returns:
the metadata. will not return null

notifyRemoteInvalidation

void notifyRemoteInvalidation(String realId)
Notifies the manager that a session in the distributed cache has been invalidated

Parameters:
realId - the session id excluding any jvmRoute

notifyLocalAttributeModification

void notifyLocalAttributeModification(String realId)
Callback from the distributed cache notifying of a local modification to a session's attributes. Meant for use with FIELD granularity, where the session may not be aware of modifications.

Parameters:
realId - the session id excluding any jvmRoute

sessionActivated

void sessionActivated()
Notification that a previously passivated session has been activated.


sessionChangedInDistributedCache

boolean sessionChangedInDistributedCache(String realId,
                                         String dataOwner,
                                         int distributedVersion,
                                         long timestamp,
                                         DistributableSessionMetadata metadata)
Callback from the distributed cache to notify us that a session has been modified remotely.

Parameters:
realId - the session id, without any trailing jvmRoute
dataOwner - the owner of the session. Can be null if the owner is unknown.
distributedVersion - the session's version per the distributed cache
timestamp - the session's timestamp per the distributed cache
metadata - the session's metadata per the distributed cache


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.