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


public final class DottedNameRegistry1To1Impl extends Object implements DottedNameRegistry

Fields Summary
final HashMap
final HashMap
private static final int
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, 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
		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 dottedName)

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

		return( (String)mObjectNamesToDottedNameStrings.get( objectName ) );
public voidremove( objectName)

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

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

		remove( dottedName, dottedNameToObjectName( dottedName ) );