org.jcreme.caches
Interface RemoteCache

All Superinterfaces:
java.rmi.Remote

public interface RemoteCache
extends java.rmi.Remote

This interface enables an application to access the cache of a remote application.

Version:
$Revision: 1.2 $
Author:
$Author: dbregeon $

Method Summary
 java.lang.Object[] getAllObjects()
          This method gives access to the full content of the cache.
 java.lang.Object[] getAllObjects(java.lang.Class type)
          This method gives the same result as the getAllObjects method but the objects in the result array are types with the parameter type.
 java.lang.Object getObject(java.lang.Object key)
          Gives access to an object registered in the cache.
 

Method Detail

getObject

public java.lang.Object getObject(java.lang.Object key)
                           throws java.rmi.RemoteException
Gives access to an object registered in the cache.

Parameters:
key - the key associated to the desired object.
Returns:
the object associated with the key or null if no object is associated to that key.
Throws:
java.rmi.RemoteException - if an error occurs during the remote call.

getAllObjects

public java.lang.Object[] getAllObjects()
                                 throws java.rmi.RemoteException
This method gives access to the full content of the cache.

Returns:
the objects present in the cache.
Throws:
java.rmi.RemoteException - if an error occurs during the remote call.

getAllObjects

public java.lang.Object[] getAllObjects(java.lang.Class type)
                                 throws java.rmi.RemoteException
This method gives the same result as the getAllObjects method but the objects in the result array are types with the parameter type.

Parameters:
type - the class of the desired objects.
Returns:
the objects present in the cache that are instances of the parameter class.
Throws:
java.rmi.RemoteException - if an error occurs during the remote call.


Copyright 2006 null. All Rights Reserved.