org.apache.jcs.auxiliary.remote.http.client
Class RemoteHttpCacheManager

java.lang.Object
  extended by org.apache.jcs.auxiliary.remote.http.client.RemoteHttpCacheManager
All Implemented Interfaces:
java.io.Serializable, AuxiliaryCacheManager, ICacheType, IShutdownObserver

public class RemoteHttpCacheManager
extends java.lang.Object
implements AuxiliaryCacheManager, IShutdownObserver

This is a very crude copy of the RMI remote manager. It needs a lot of work!

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE
 
Method Summary
protected  IRemoteHttpCacheClient createRemoteHttpCacheClientForAttributes(RemoteHttpCacheAttributes cattr)
          This is an extension point.
 AuxiliaryCache getCache(RemoteHttpCacheAttributes cattr)
          Gets a RemoteCacheNoWait from the RemoteCacheManager.
 AuxiliaryCache getCache(java.lang.String cacheName)
          Returns a remote cache for the given cache name.
 int getCacheType()
          Gets the cacheType attribute of the RemoteCacheManager object
 IRemoteCacheAttributes getDefaultCattr()
          Gets the defaultCattr attribute of the RemoteCacheManager object.
static RemoteHttpCacheManager getInstance()
           
static RemoteHttpCacheManager getInstance(ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer)
          Get the singleton instance.
 java.lang.String getStats()
          Gets the stats attribute of the RemoteCacheManager object
protected  void logApplicationEvent(java.lang.String source, java.lang.String eventName, java.lang.String optionalDetails)
          Logs an event if an event logger is configured.
 void shutdown()
          Shutdown callback from composite cache manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultCattr

public IRemoteCacheAttributes getDefaultCattr()
Gets the defaultCattr attribute of the RemoteCacheManager object.

Returns:
The defaultCattr value

getInstance

public static RemoteHttpCacheManager getInstance()
Returns:
Returns an instance if it exists. else null.

getInstance

public static RemoteHttpCacheManager getInstance(ICompositeCacheManager cacheMgr,
                                                 ICacheEventLogger cacheEventLogger,
                                                 IElementSerializer elementSerializer)
Get the singleton instance.

Parameters:
cacheMgr -
cacheEventLogger -
elementSerializer -
Returns:
The instance value

getCache

public AuxiliaryCache getCache(java.lang.String cacheName)
Returns a remote cache for the given cache name.

Specified by:
getCache in interface AuxiliaryCacheManager
Parameters:
cacheName -
Returns:
The cache value

getCache

public AuxiliaryCache getCache(RemoteHttpCacheAttributes cattr)
Gets a RemoteCacheNoWait from the RemoteCacheManager. The RemoteCacheNoWait objects are identified by the cache name value of the RemoteCacheAttributes object.

If the client is configured to register a listener, this call results on a listener being created if one isn't already registered with the remote cache for this region.

Parameters:
cattr -
Returns:
The cache value

createRemoteHttpCacheClientForAttributes

protected IRemoteHttpCacheClient createRemoteHttpCacheClientForAttributes(RemoteHttpCacheAttributes cattr)
This is an extension point. The manager and other classes will only create RemoteHttpCacheClient through this method.

Parameters:
cattr -
Returns:
IRemoteHttpCacheClient

getStats

public java.lang.String getStats()
Gets the stats attribute of the RemoteCacheManager object

Returns:
The stats value

getCacheType

public int getCacheType()
Gets the cacheType attribute of the RemoteCacheManager object

Specified by:
getCacheType in interface ICacheType
Returns:
The cacheType value

shutdown

public void shutdown()
Shutdown callback from composite cache manager.

Specified by:
shutdown in interface IShutdownObserver
See Also:
IShutdownObserver.shutdown()

logApplicationEvent

protected void logApplicationEvent(java.lang.String source,
                                   java.lang.String eventName,
                                   java.lang.String optionalDetails)
Logs an event if an event logger is configured.

Parameters:
source -
eventName -
optionalDetails -


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.