com.artima.place
Class LinkMapEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.artima.place.LinkMapEvent
All Implemented Interfaces:
java.io.Serializable

public class LinkMapEvent
extends java.util.EventObject

An event that indicates a change in the contents of a DynamicLinkMap. This event will only be fired if at least one link was altered, added, or removed. A single LinkMapEvent may be used to report multiple alterations, additions, and/or removals. Each alteration, addition, or removal of a particular DynamicLinkMap is reported in one and only one LinkMapEvent.

See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LinkMapEvent(DynamicLinkMap source, java.lang.Object[] keysAltered, java.lang.Object[] keysAdded, java.lang.Object[] keysRemoved)
          Constructs a LinkMapEvent object with the specified keys altered, added, and removed.
 
Method Summary
 java.lang.Object[] getKeysAdded()
          Returns an array of Object keys for those links that have been added.
 java.lang.Object[] getKeysAltered()
          Returns an array of Object keys for those links that have been altered.
 java.lang.Object[] getKeysRemoved()
          Returns an array of Object keys for those links that have been removed.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkMapEvent

public LinkMapEvent(DynamicLinkMap source,
                    java.lang.Object[] keysAltered,
                    java.lang.Object[] keysAdded,
                    java.lang.Object[] keysRemoved)
Constructs a LinkMapEvent object with the specified keys altered, added, and removed. To indicate that no values have been altered (or added, or removed), either an empty Object array or a null reference must be passed in the keysAltered (or keysAdded or keysRemoved) parameter.
Parameters:
source - the source of this LinkMapEvent
keysAltered - an array of keys whose LinkItem values have been altered
keysAdded - an array of keys associated with LinkItem values that have been added
keysRemoved - an array of keys associated with LinkItem values that have been removed
Throws:
NullPointerException - if passed source is null
Method Detail

getKeysAltered

public java.lang.Object[] getKeysAltered()
Returns an array of Object keys for those links that have been altered. A link is "altered" if a value for that key already existed in the LinkMap, and the value was altered or replaced a new value. If no links have been altered since the previous LinkMapEvent was propagated (or since the DynamicLinkMap was sent to the client if this is the first LinkMapEvent propagated), this method returns an empty Object array. This method never returns null.
Returns:
the array of altered keys

getKeysAdded

public java.lang.Object[] getKeysAdded()
Returns an array of Object keys for those links that have been added. A link is "added" if the key for a newly added LinkItem value did not previously exist in the LinkMap. If no links have been added since the previous LinkMapEvent was propagated (or since the DynamicLinkMap was sent to the client if this is the first LinkMapEvent propagated), this method returns an empty Object array. This method never returns null.
Returns:
the array of added keys

getKeysRemoved

public java.lang.Object[] getKeysRemoved()
Returns an array of Object keys for those links that have been removed. A link is "removed" if its key previously existed in the LinkMap, but now does not. If no links have been removed since the previous LinkMapEvent was propagated (or since the DynamicLinkMap was sent to the client if this is the first LinkMapEvent propagated), this method returns an empty Object array. This method never returns null.
Returns:
the array of removed keys