net.dpml.transit.model
Interface CacheModel

All Superinterfaces:
Remote

public interface CacheModel
extends Remote

A CacheModel maintains information about the configuration of the Transit cache subsystem. Instances of CacheModel shall be supplied to cache handler implementations as constructor arguments.

Version:
1.1.0
Author:
Digital Product Meta Library

Field Summary
static String CACHE_LAYOUT_KEY
          The property key used to identify the cache layout model id when configuring a transit profile via an authorative url.
static String CACHE_LOCATION_KEY
          The property key used to identify the cache location when configuring a transit profile via an authorative url.
 
Method Summary
 void addCacheListener(CacheListener listener)
          Add a cache listener to the model.
 File getCacheDirectory()
          Return the directory to be used by the cache handler as the cache directory.
 String getCacheDirectoryPath()
          Return the directory path to be used by the cache handler.
 HostModel getHostModel(String id)
          Return an identified host model.
 HostModel[] getHostModels()
          Return the array of hosts configured for the cache.
 LayoutModel getLayoutModel()
          Return the cache layout model.
 LayoutRegistryModel getLayoutRegistryModel()
          Return the layout registry model.
 void removeCacheListener(CacheListener listener)
          Remove a cache listener from the model.
 

Field Detail

CACHE_LOCATION_KEY

static final String CACHE_LOCATION_KEY
The property key used to identify the cache location when configuring a transit profile via an authorative url.

See Also:
Constant Field Values

CACHE_LAYOUT_KEY

static final String CACHE_LAYOUT_KEY
The property key used to identify the cache layout model id when configuring a transit profile via an authorative url.

See Also:
Constant Field Values
Method Detail

getCacheDirectoryPath

String getCacheDirectoryPath()
                             throws RemoteException
Return the directory path to be used by the cache handler.

Returns:
the cache directory path.
Throws:
RemoteException - if a remote exception occurs

getCacheDirectory

File getCacheDirectory()
                       throws RemoteException
Return the directory to be used by the cache handler as the cache directory.

Returns:
the cache directory.
Throws:
RemoteException - if a remote exception occurs

getHostModels

HostModel[] getHostModels()
                          throws RemoteException
Return the array of hosts configured for the cache.

Returns:
the host model array
Throws:
RemoteException - if a remote exception occurs

getHostModel

HostModel getHostModel(String id)
                       throws UnknownKeyException,
                              RemoteException
Return an identified host model.

Parameters:
id - the host identifier
Returns:
the host model
Throws:
UnknownKeyException - if the requested host id is unknown
RemoteException - if a remote exception occurs

addCacheListener

void addCacheListener(CacheListener listener)
                      throws RemoteException
Add a cache listener to the model.

Parameters:
listener - the listener to add
Throws:
RemoteException - if a remote exception occurs

removeCacheListener

void removeCacheListener(CacheListener listener)
                         throws RemoteException
Remove a cache listener from the model.

Parameters:
listener - the listener to remove
Throws:
RemoteException - if a remote exception occurs

getLayoutModel

LayoutModel getLayoutModel()
                           throws RemoteException
Return the cache layout model.

Returns:
the layout model
Throws:
RemoteException - if a remote exception occurs

getLayoutRegistryModel

LayoutRegistryModel getLayoutRegistryModel()
                                           throws RemoteException
Return the layout registry model.

Returns:
the layout registry model
Throws:
RemoteException - if a remote exception occurs