FileDocCategorySizeDatePackage
DottedNameRegistry1To1Impl.javaAPI DocGlassfish v2 API4859Fri May 04 22:24:08 BST 2007com.sun.enterprise.admin.dottedname

DottedNameRegistry1To1Impl

public final class DottedNameRegistry1To1Impl extends Object implements DottedNameRegistry

Fields Summary
final HashMap
mDottedNameStringsToObjectNames
final HashMap
mObjectNamesToDottedNameStrings
private static final int
INITIAL_CAPACITY
Constructors Summary
public DottedNameRegistry1To1Impl()

	
		
	 
	
		/*
		 	Keep mappings both ways to allow efficient removal
		 	based on either.
		*/
		mDottedNameStringsToObjectNames		= new HashMap( INITIAL_CAPACITY );
		mObjectNamesToDottedNameStrings		= new HashMap( INITIAL_CAPACITY );
	
Methods Summary
public synchronized voidadd(java.lang.String dottedName, javax.management.ObjectName objectName)

        new DottedName( dottedName );
		/*
			Don't allow more than one dotted name mapping for an ObjectName.
			
			The check here must be via the ObjectName; checking the dottedName
			will do no good as this could be a new dottedName for the same
			ObjectName.
		 */
		if ( objectNameToDottedName( objectName ) != null )
		{
			remove( objectName );
		}

		mDottedNameStringsToObjectNames.put( dottedName, objectName );
		mObjectNamesToDottedNameStrings.put( objectName, dottedName );
	
public synchronized java.util.SetallDottedNameStrings()

		return( copySet( mDottedNameStringsToObjectNames.keySet() ) );
	
public synchronized java.util.SetallObjectNames()

		return( copySet( mObjectNamesToDottedNameStrings.keySet() ) );
	
private java.util.SetcopySet(java.util.Set input)

		final HashSet	newSet	= new HashSet();
		
		newSet.addAll( input );
		
		return( newSet );
	
public synchronized javax.management.ObjectNamedottedNameToObjectName(java.lang.String dottedName)

		return( (ObjectName)mDottedNameStringsToObjectNames.get( dottedName ) );
	
public synchronized java.lang.StringobjectNameToDottedName(javax.management.ObjectName objectName)

		return( (String)mObjectNamesToDottedNameStrings.get( objectName ) );
	
public voidremove(javax.management.ObjectName objectName)

		remove( objectNameToDottedName( objectName ), objectName );
	
synchronized voidremove(java.lang.String dottedName, javax.management.ObjectName objectName)

		if ( dottedName != null && objectName != null )
		{
			mDottedNameStringsToObjectNames.remove( dottedName );
			mObjectNamesToDottedNameStrings.remove( objectName );
		}
	
public voidremove(java.lang.String dottedName)

		remove( dottedName, dottedNameToObjectName( dottedName ) );