FileDocCategorySizeDatePackage
ActiveObjectMap.javaAPI DocJava SE 5 API5668Fri Aug 26 14:54:26 BST 2005com.sun.corba.se.impl.oa.poa

ActiveObjectMap

public abstract class ActiveObjectMap extends Object
The ActiveObjectMap maintains associations between servants and their keys. There are two variants, to support whether or not multiple IDs per servant are allowed. This class suppots bidirectional traversal of the key-servant association. Access to an instance of this class is serialized by the POA mutex.

Fields Summary
protected POAImpl
poa
private Map
keyToEntry
private Map
entryToServant
private Map
servantToEntry
Constructors Summary
protected ActiveObjectMap(POAImpl poa)

	this.poa = poa ;
    
Methods Summary
protected voidclear()

        keyToEntry.clear();
    
public final booleancontains(org.omg.PortableServer.Servant value)

 // Map< Servant, AOMEntry >

          
    
	return servantToEntry.containsKey( value ) ;
    
public final booleancontainsKey(com.sun.corba.se.impl.oa.poa.ActiveObjectMap$Key key)

	return keyToEntry.containsKey(key);
    
public static com.sun.corba.se.impl.oa.poa.ActiveObjectMapcreate(POAImpl poa, boolean multipleIDsAllowed)

	if (multipleIDsAllowed)
	    return new MultipleObjectMap( poa ) ;
	else
	    return new SingleObjectMap(poa ) ;
    
public final AOMEntryget(com.sun.corba.se.impl.oa.poa.ActiveObjectMap$Key key)
get Returbs the entry assigned to the key, or creates a new entry in state INVALID if none is present.

	AOMEntry result = (AOMEntry)keyToEntry.get(key);
	if (result == null) {
	    result = new AOMEntry( poa ) ;
	    putEntry( key, result ) ;
	}

	return result ;
    
public abstract com.sun.corba.se.impl.oa.poa.ActiveObjectMap$KeygetKey(AOMEntry value)

public com.sun.corba.se.impl.oa.poa.ActiveObjectMap$KeygetKey(org.omg.PortableServer.Servant value)

	AOMEntry entry = (AOMEntry)servantToEntry.get( value ) ;
	return getKey( entry ) ;
    
public final org.omg.PortableServer.ServantgetServant(AOMEntry entry)

	return (Servant)entryToServant.get( entry ) ;
    
public abstract booleanhasMultipleIDs(AOMEntry value)

public final java.util.SetkeySet()

	return keyToEntry.keySet() ;
    
protected voidputEntry(com.sun.corba.se.impl.oa.poa.ActiveObjectMap$Key key, AOMEntry value)

	keyToEntry.put( key, value ) ;
    
public final voidputServant(org.omg.PortableServer.Servant servant, AOMEntry value)

	entryToServant.put( value, servant ) ;
	servantToEntry.put( servant, value ) ;
    
public final voidremove(com.sun.corba.se.impl.oa.poa.ActiveObjectMap$Key key)

	AOMEntry entry = (AOMEntry)keyToEntry.remove( key ) ;
	Servant servant = (Servant)entryToServant.remove( entry ) ;
	if (servant != null)
	    servantToEntry.remove( servant ) ;

	removeEntry( entry, key ) ;
    
protected abstract voidremoveEntry(AOMEntry entry, com.sun.corba.se.impl.oa.poa.ActiveObjectMap$Key key)