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

IRepository

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.
author
Kedar Mhaswade
version
1.0

Fields Summary
Constructors Summary
Methods Summary
public booleanadd(javax.management.ObjectName 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.

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

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

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

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

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

public java.lang.ObjectfindPersistent(javax.management.ObjectName 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.

return
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.

return
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.

param
domainName - String representing the name of domain.

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

return
int representing all MBeans in this repository.

public java.util.Setquery(javax.management.ObjectName 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.

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

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

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