Methods Summary |
---|
public synchronized void | addMapping(javax.management.ObjectName objectName, java.lang.String prefix, java.util.Set legalAttributes)Add a mapping from an ObjectName to its dotted name prefixes.
if ( objectName == null || prefix == null )
{
throw new IllegalArgumentException( "null" );
}
if ( mObjectNameToPrefix.containsKey( objectName ) )
{
throw new IllegalArgumentException( "Already registered: " + objectName );
}
mObjectNameToPrefix.put( objectName, prefix );
mPrefixToObjectName.put( prefix, objectName );
mLegalAttributes.put( objectName, Collections.unmodifiableSet( legalAttributes ) );
|
public java.util.Set | getLegalAttributes(javax.management.ObjectName objectName)
return mLegalAttributes.get( objectName );
|
public javax.management.ObjectName | getObjectName(java.lang.String prefix)
return mPrefixToObjectName.get( prefix );
|
public java.util.Set | getObjectNames()
final Set<ObjectName> result = new HashSet<ObjectName>();
result.addAll( mObjectNameToPrefix.keySet() );
return result;
|
public java.lang.String | getPrefix(javax.management.ObjectName objectName)
return mObjectNameToPrefix.get( objectName );
|
public java.util.Set | getPrefixes()
final Set<String> result = new HashSet<String>();
result.addAll( mObjectNameToPrefix.values() );
return result;
|
public synchronized void | removeMapping(javax.management.ObjectName objectName)
final String prefix = mObjectNameToPrefix.get( objectName );
if ( prefix != null )
{
mObjectNameToPrefix.remove( objectName );
mLegalAttributes.remove( objectName );
mPrefixToObjectName.remove( prefix );
}
|