com.sun.jaw.reference.agent.services
Interface MoRepSrvIf

All Known Implementing Classes:
PersistentRepSrv, RepositorySrv

public abstract interface MoRepSrvIf
extends java.io.Serializable

This interface provides a means for accessing a local Managed Object Repository.

A Managed Object Repository contains references to managed object instances. Objects stored in the Object Repository are objects that can be managed.

A Managed Object Repository is used by the Common Management Framework for storing and retrieving objects to be managed.


Fields inherited from class java.io.Serializable
serialVersionUID
 
Method Summary
 boolean contains(java.lang.Object object)
          Checks whether an object is already stored in the Object Repository.
 boolean contains(ObjectName name)
          Checks whether an object is already stored in the Object Repository.
 java.lang.String getDomain()
          Gets the domain name associated with the repository.
 java.lang.Integer getNbElements()
          Returns the number of objects currently stored in the Object Repository.
 java.util.Vector getObject(ObjectName name, QueryExp query)
          Gets handles on managed objects controlled by the Object Repository.
 boolean isPersistent()
          Indicates whether or not the Object Repository offers persistency.
 boolean isQuerySrv()
          Indicates whether or not the Object Repository supports filtering.
 void register(java.lang.Object object, ObjectName name)
          Registers a named object in the Object Repository.
 void registerDB(java.lang.Object object, ObjectName name)
          Registers a named object with persistency in the Object Repository.
 java.lang.Object retrieve(ObjectName name)
          Checks whether an object with a specific name is contained in the Object Repository.
 void setConfig(java.util.Vector params)
          The method is only required when configuring JDBC implementations of a repository.
 void setDomain(java.lang.String domain)
          Sets the domain name associated with the repository.
 void unregister(java.lang.Object object)
          Removes a reference from the Object Repository using the object reference.
 void unregister(ObjectName name)
          Removes a reference from the Object Repository using the object name.
 void update(java.lang.Object object, ObjectName name)
          Updates an object in the Object Repository.
 

Method Detail

setConfig

public void setConfig(java.util.Vector params)
The method is only required when configuring JDBC implementations of a repository. The purpose of the method is to provide a unify way of configuring different repository implemenations.
Parameters:
params - a vector containing the different configuration parameters of the repository.

register

public void register(java.lang.Object object,
                     ObjectName name)
              throws java.lang.IllegalArgumentException,
                     InstanceAlreadyExistException
Registers a named object in the Object Repository.
Parameters:
object - Object to be added to the repository.
name - Name of the object.
Throws:
java.lang.IllegalArgumentException - One of the parameters in the call to the method is invalid.
InstanceAlreadyExistException - The instance is already registered in the object repository.

registerDB

public void registerDB(java.lang.Object object,
                       ObjectName name)
                throws java.lang.IllegalArgumentException,
                       InstanceAlreadyExistException
Registers a named object with persistency in the Object Repository.
Parameters:
object - Object to be added to the repository.
name - Name of the object.
Throws:
java.lang.IllegalArgumentException - One of the parameters in the call to the method is invalid.
InstanceAlreadyExistException - The instance is already registered in the object repository.

update

public void update(java.lang.Object object,
                   ObjectName name)
            throws InstanceNotFoundException
Updates an object in the Object Repository.
Parameters:
object - The new object.
name - Name of the object.
Throws:
InstanceNotFoundException - Object not found in repository.

unregister

public void unregister(java.lang.Object object)
                throws InstanceNotFoundException
Removes a reference from the Object Repository using the object reference.
Parameters:
object - Object to be removed from the repository.
Throws:
InstanceNotFoundException - Object not found in repository.

unregister

public void unregister(ObjectName name)
                throws InstanceNotFoundException
Removes a reference from the Object Repository using the object name.
Parameters:
object - Object to be removed from the repository.
Throws:
InstanceNotFoundException - Object not found in repository.

contains

public boolean contains(java.lang.Object object)
Checks whether an object is already stored in the Object Repository.
Parameters:
object - The object to be checked for.
Returns:
True if the object is part of the repository, false otherwise.

contains

public boolean contains(ObjectName name)
Checks whether an object is already stored in the Object Repository.
Parameters:
objectName - The object to be checked for.
Returns:
True if the object is part of the repository, false otherwise.

retrieve

public java.lang.Object retrieve(ObjectName name)
Checks whether an object with a specific name is contained in the Object Repository.
Parameters:
name - The name to be retrieved.
Returns:
The object if the object is part of the repository, null otherwise.

isQuerySrv

public boolean isQuerySrv()
Indicates whether or not the Object Repository supports filtering. 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.

isPersistent

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

getDomain

public java.lang.String getDomain()
Gets the domain name associated with the repository.
Returns:
The server's domain name.

setDomain

public void setDomain(java.lang.String domain)
Sets the domain name associated with the repository.

getObject

public java.util.Vector getObject(ObjectName name,
                                  QueryExp query)
Gets handles on managed objects controlled by the Object Repository.
Parameters:
name - Instance name of the object to be retrieved.
query - Query to apply when selecting objects.
Returns:
The list of selected managed objects.

getNbElements

public java.lang.Integer getNbElements()
Returns the number of objects currently stored in the Object Repository.
Returns:
The number of objects.