IRepository.javaAPI DocGlassfish v2 API5504Fri May 04 22:33:48 BST 2007com.sun.enterprise.admin.server.core.jmx


public interface IRepository
Defines the interface for a Repository of MBeans. Note that there is a one to many relationship between an MBeanServer and Domains of MBeans. This interface abstracts out that relationship and hides the fact that in fact there can be multiple Repositories, one per Domain.
Kedar Mhaswade

Fields Summary
Constructors Summary
Methods Summary
public booleanadd( name, java.lang.Object mbeanImpl)
Adds an Object in the repository. Neither Object nor the ObjectName should be null. Given Object will not be added if an Object with the same ObjectName already exists in the repository.

objectName - ObjectName of the Object to be stored.
mbeanImpl - Object that is to be stored.
true if the addition was successful, false otherwise.

public booleancontains( objectName)
Tests whether an Object with given ObjectName is present in this Repository.

objectName - ObjectName of the Object to be searched for.
true if the Object could be found, false otherwise.

public java.lang.Objectfind( objectName)
Returns the Object with given ObjectName. Returns null if there is no Object with given ObjectName. Passed ObjectName may not be null.

objectName - ObjectName of the Object to be searched for. Note that ObjectName may not be a pattern for query or pattern on key properties.
Object searched, null if there is none. Also returns null, if the ObjectName is pattern.

public java.lang.ObjectfindPersistent( objectName)
Makes the check for the existence of corresponding element in the persistent store. This method will also register or unregister the MBeans as required by adding/removing them, depending on its existence in the persistent store.

MBean that is registered, null otherwise. In case of the MBean that exists in both MBeanRepository and persistent store simply the object in memory is returned.

public java.util.SetgetAllMBeans()
Method to get ALL MBeans in all domains in this repository. The returned Set contains the ObjectNames of all MBeans.

Set containing MBean ObjectNames, null if none exists.

public intgetCount(java.lang.String domainName)
Returns the number of Objects stored in the repository for given domainName.

domainName - String representing the name of domain.

public intgetTotalCount()
Returns the total number of MBeans stored in entire repository.

int representing all MBeans in this repository.

public java.util.Setquery( objectName)
Returns a Set of Objects whose ObjectNames match zero or more Objects in the repository as per the pattern suggested by the argument. If the argument is NOT a pattern an exact match will be performed.

objectName the ObjectName that may represent a pattern.
Set of all Objects that match the pattern in argument, null if there is no such object.

public booleanremove( objectName)
Removes the Object with given ObjectName from repository. The passed ObjectName must not be null.

objectName - ObjectName of the Object to be removed.
true if the Object could be removed, false otherwise.