jrun.security
Class SecurityContextCache

jrunx.kernel.ServiceAdapter
  |
  +--jrunx.kernel.ServicePartition
        |
        +--jrunx.kernel.ConfigurableServicePartition
              |
              +--jrunx.cluster.ClusterableServiceAdapter
                    |
                    +--jrun.security.SecurityContextCache
All Implemented Interfaces:
ClusterableService, ClusterableServiceAdapterMBean, ClusterConstants, ConfigurableServicePartitionMBean, javax.naming.Referenceable, java.rmi.Remote, SecurityContextCacheInterface, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean

public class SecurityContextCache
extends ClusterableServiceAdapter
implements SecurityContextCacheInterface

Clusterable service that keeps a cache of SecurityContexts created on authentication This enables the SecurityContexts to be propagated among the nodes in a cluster such that if a user is authenticated to one node, then he is authenticated to all the nodes However, authorization is still performed locally. This means all the nodes should either share the same security store or have them replicated for authorization

See Also:
Serialized Form

Field Summary
static java.lang.String OBJECT_NAME
           
 
Fields inherited from class jrunx.cluster.ClusterableServiceAdapter
clientSocketFactoryName, defaultAlgorithm, myHost, myIP, myPeers, myStub, port, serverSocketFactoryName
 
Fields inherited from class jrunx.kernel.ServicePartition
sortedServices
 
Fields inherited from class jrunx.kernel.ServiceAdapter
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER
 
Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Fields inherited from interface jrunx.cluster.ClusterConstants
AVAILABLE_SERVICES, CLUSTER_MANAGER_JNDI, DEFAULT_CLUSTER_DOMAIN, DEFAULT_ENABLED, JINI_CODE_BASE_JAR, PRIMARY_SERVICE, SECONDARY_SERVICE
 
Constructor Summary
SecurityContextCache()
           
 
Method Summary
 SecurityContext get(java.lang.Object key)
           
 Logger getLogger()
          Returns an instance of the current logger for this context
 void put(java.lang.Object key, SecurityContext jrsc)
           
 void put(java.lang.Object key, SecurityContext jrsc, boolean broadcast)
           
 void remove(java.lang.Object key)
           
 void remove(java.lang.Object key, boolean broadcast)
           
 
Methods inherited from class jrunx.cluster.ClusterableServiceAdapter
addPeerListener, addServersToClients, destroy, getClientSocketFactory, getClusterAlgorithm, getPeers, getPort, getRemoteHostIP, getRemoteHostName, getRemoteServerName, getServerInfo, getServerSocketFactoryClass, init, invoke, isValidPeer, killRemoteServer, numPeers, setClientSocketFactoryClass, setClusterAlgorithm, setPort, setServerSocketFactoryClass, start, stop, toStub
 
Methods inherited from class jrunx.kernel.ConfigurableServicePartition
destroyServices, initServices, loadAndInit, loadChildren, setChildElements, startServices, stopServices
 
Methods inherited from class jrunx.kernel.ServicePartition
addService, addService, getServices, invokeChain, iterator, removeService, removeService
 
Methods inherited from class jrunx.kernel.ServiceAdapter
bind, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, toString, unbind, unscheduleRunnable, updateStatus
 
Methods inherited from interface jrunx.cluster.ClusterableService
getPeers, getRemoteHostIP, getRemoteHostName, getRemoteServerName, getServerInfo, invoke, killRemoteServer, numPeers, toStub
 
Methods inherited from interface jrunx.kernel.ConfigurableServicePartitionMBean
setChildElements
 
Methods inherited from interface jrunx.kernel.ServicePartitionMBean
addService, addService, iterator, removeService, removeService
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
getStatus, updateStatus
 

Field Detail

OBJECT_NAME

public static java.lang.String OBJECT_NAME
Constructor Detail

SecurityContextCache

public SecurityContextCache()
Method Detail

get

public SecurityContext get(java.lang.Object key)
                    throws java.rmi.RemoteException
Specified by:
get in interface SecurityContextCacheInterface

put

public void put(java.lang.Object key,
                SecurityContext jrsc)
Specified by:
put in interface SecurityContextCacheInterface

put

public void put(java.lang.Object key,
                SecurityContext jrsc,
                boolean broadcast)
         throws java.rmi.RemoteException

remove

public void remove(java.lang.Object key)
Specified by:
remove in interface SecurityContextCacheInterface

remove

public void remove(java.lang.Object key,
                   boolean broadcast)
            throws java.rmi.RemoteException

getLogger

public Logger getLogger()
Description copied from class: ServiceAdapter
Returns an instance of the current logger for this context
Overrides:
getLogger in class ServiceAdapter
Following copied from class: jrunx.kernel.ServiceAdapter
Returns:
The logger, or null if not found


Copyright � 2002 Macromedia Corporation. All Rights Reserved.