com.artima.place
Interface ModifiablePlace

All Superinterfaces:
DynamicPlace, Place

public interface ModifiablePlace
extends DynamicPlace

A modifiable map of Links to services on the network.


Method Summary
 void clear()
          Removes all mapping from this Place.
 LinkItem put(int keyValue, LinkItem value)
          Convenience method that associates the specified value with the Integer key whose int value equals the int specified keyValue.
 java.lang.Object put(LinkItem value)
          Associates the specified value in this Place with a new unique key selected by this method.
 LinkItem put(java.lang.Object key, LinkItem value)
          Associates the specified value with the specified key in this Place.
 void putAll(Place map)
          Copies all of the mappings from the specified Place to this Place.
 LinkItem remove(java.lang.Object key)
          Removes the mapping for this key from this Place if present.
 LinkItem updateAttributes(java.lang.Object key, java.util.Set attributes)
          Associates the specified attributes Set with the Link that is associated with the specified key in this Place.
 
Methods inherited from interface com.artima.place.DynamicPlace
addPlaceChangeListener, removePlaceChangeListener
 
Methods inherited from interface com.artima.place.Place
containsAllKeys, containsAllLinkItems, containsKey, containsKey, containsLinkItem, get, get, isEmpty, keyIterator, keySetSize, linkItemIterator, size
 

Method Detail

clear

public void clear()
           throws java.rmi.RemoteException
Removes all mapping from this Place.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

put

public LinkItem put(java.lang.Object key,
                    LinkItem value)
             throws java.rmi.RemoteException
Associates the specified value with the specified key in this Place.
Parameters:
key - the key with which to associate the specified LinkItem value in this Place.
value - the LinkItem value to associate with the specified key in this Place.
Returns:
the LinkItem with which the key was previously associated, or null if there was no mapping for the key.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

put

public LinkItem put(int keyValue,
                    LinkItem value)
             throws java.rmi.RemoteException
Convenience method that associates the specified value with the Integer key whose int value equals the int specified keyValue.
Parameters:
key - the key with which (in Integer form) to associate the specified LinkItem value in this Place.
value - the LinkItem value to associate with the specified key in this Place.
Returns:
the LinkItem with which the key was previously associated, or null if there was no mapping for the key.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

put

public java.lang.Object put(LinkItem value)
                     throws java.rmi.RemoteException
Associates the specified value in this Place with a new unique key selected by this method.
Parameters:
value - the LinkItem value to associate with a randomly selected new key in this Place.
Returns:
the key with which the LinkItem was associated.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations

updateAttributes

public LinkItem updateAttributes(java.lang.Object key,
                                 java.util.Set attributes)
                          throws java.rmi.RemoteException
Associates the specified attributes Set with the Link that is associated with the specified key in this Place.
Parameters:
key - the key with which to associate the specified LinkItem value in this Place.
attributes - the attributes Set value to associate with the Link contained in the LinkItem specified by the passed key in this Place.
Returns:
the updated LinkItem.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations
NoSuchElementException - if the key is not associated with any LinkItem in this ModifiablePlace

putAll

public void putAll(Place map)
            throws java.rmi.RemoteException
Copies all of the mappings from the specified Place to this Place.
Parameters:
map - the Place from which to copy mappings to this Place.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations.

remove

public LinkItem remove(java.lang.Object key)
                throws java.rmi.RemoteException
Removes the mapping for this key from this Place if present.
Parameters:
key - the key whose mapping is to be removed from this Place.
Returns:
the removed LinkItem, or null if there was no mapping for this key.
Throws:
java.rmi.RemoteException - if a network problem prevents this method from fulfilling its contractual obligations