All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.impl.agent.services.light.RepositorySrv

java.lang.Object
   |
   +----com.sun.jaw.impl.agent.services.light.RepositorySrv

public class RepositorySrv
extends Object
implements MoRepSrvIf
This class provides a simple implementation of an object repository.

The implementation does not offer any persistency. The objects are stored in memory.

See Also:
MoRepSrvIf

Constructor Index

 o RepositorySrv()
Default constructor.

Method Index

 o contains(Object)
Checks if a managed object is already stored in the Object Repository.
 o contains(ObjectName)
Checks if a managed object is already stored in the Object Repository.
 o getClassVersion()
Returns the version of this class.
 o getDomain()
Gets the domain name associated with the Object Repository.
 o getNbElements()
Returns the number of elements stored in the Object Repository.
 o getObject(ObjectName, QueryExp)
Get handles on managed objects controlled by the Object Repository.
 o isPersistent()
Indicates whether or not the Object Repository offers persistency or not.
 o isQuerySrv()
Indicates whether or not the Object Repository supports filtering or not.
 o register(Object, ObjectName)
Registers a named object into the Object Repository.
 o registerDB(Object, ObjectName)
Registers a named object with persistency into the Object Repository.
 o retrieve(ObjectName)
Retrieves the managed object from the Object Repository.
 o setConfig(Vector)
The method does not perform anything for the current implementation of the repository.
 o setDomain(String)
Sets the domain name associated with the Object Repository.
 o unregister(Object)
Removes a managed object from the Object Repository.
 o unregister(ObjectName)
Removes a managed object from the Object Repository.
 o update(Object, ObjectName)
Updates the managed object in the Object Repository.

Constructors

 o RepositorySrv
 public RepositorySrv()
Default constructor.

Methods

 o setConfig
 public void setConfig(Vector params)
The method does not perform anything for the current implementation of the repository. The method is only provided to comply to the MoRepSrvIf interface definition.

 o isQuerySrv
 public boolean isQuerySrv()
Indicates whether or not the Object Repository supports filtering or not. If the Object Repository does not support filtering, then the Common Management Framework (CMF) will perform filtering itself on behalf of the Object Repository.

Returns:
true if the filtering is supported, false otherwise.
 o isPersistent
 public boolean isPersistent()
Indicates whether or not the Object Repository offers persistency or not.

Returns:
true if persistence is supported, false otherwise.
 o contains
 public boolean contains(ObjectName name)
Checks if a managed object is already stored in the Object Repository.

Parameters:
name - name of the managed object to find.
Returns:
true if the managed object is part of the repository, false otherwise.
 o retrieve
 public Object retrieve(ObjectName name)
Retrieves the managed object from the Object Repository.

Parameters:
name - name of the managed object to retrieve.
Returns:
the retrieved managed object, null otherwise.
 o contains
 public boolean contains(Object object)
Checks if a managed object is already stored in the Object Repository. This method is to be used only with a singleton, that is, only one instance of that class is permitted within the repository for a given domain.

Parameters:
object - object to find.
Returns:
true if the managed object is part of the repository, false otherwise.
 o registerDB
 public void registerDB(Object object,
                        ObjectName name) throws InstanceAlreadyExistException
Registers a named object with persistency into the Object Repository.

NOTE: This service does not support persistency.

Parameters:
object - object to be added to the repository.
name - logical name of the object.
Throws: InstanceAlreadyExistException
The instance is already registered in the object repository.
Throws: ServiceNotFoundException
The requested service is not supported.
 o register
 public void register(Object object,
                      ObjectName name) throws InstanceAlreadyExistException
Registers a named object into the Object Repository.

Parameters:
object - object to be added to the repository.
name - logical name of the object.
Throws: InstanceAlreadyExistException
The instance is already registered in the object repository.
 o update
 public void update(Object object,
                    ObjectName name) throws InstanceNotFoundException
Updates the managed object in the Object Repository.

Parameters:
object - the new object.
name - name of the managed object.
Throws: InstanceNotFoundException
Object not found in repository.
 o unregister
 public void unregister(ObjectName name) throws InstanceNotFoundException
Removes a managed object from the Object Repository.

Parameters:
name - name of the managed object.
Throws: InstanceNotFoundException
Object not found in repository.
 o unregister
 public void unregister(Object object) throws InstanceNotFoundException
Removes a managed object from the Object Repository. This method is to be used only for unregistering a singleton, that is, only one instance of that class is permitted within the repository for a given domain.

Parameters:
object - managed object to remove from the Object Repository
Throws: InstanceNotFoundException
Object not found in repository.
 o getObject
 public Vector getObject(ObjectName name,
                         QueryExp query)
Get handles on managed objects controlled by the Object Repository.

Parameters:
name - name of the managed object.
query - query to apply when selecting objects.
Returns:
The list of selected managed objects is returned.
 o getClassVersion
 public static String getClassVersion()
Returns the version of this class.

 o getNbElements
 public Integer getNbElements()
Returns the number of elements stored in the Object Repository.

 o getDomain
 public String getDomain()
Gets the domain name associated with the Object Repository.

 o setDomain
 public void setDomain(String domain)
Sets the domain name associated with the Object Repository.


All Packages  Class Hierarchy  This Package  Previous  Next  Index