Package adams.event

Class StorageChangeEvent

  • All Implemented Interfaces:
    Serializable

    public class StorageChangeEvent
    extends EventObject
    Gets sent whenever storage items get modified.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Name

        protected String m_Name
        the name of the storage item.
      • m_Cache

        protected String m_Cache
        the cache (null if none).
    • Constructor Detail

      • StorageChangeEvent

        public StorageChangeEvent​(Storage source,
                                  StorageChangeEvent.Type type,
                                  String name)
        Initializes the event.
        Parameters:
        source - the storage object that triggered the event
        type - the type of event
        name - the name of the variable
      • StorageChangeEvent

        public StorageChangeEvent​(Storage source,
                                  StorageChangeEvent.Type type,
                                  String name,
                                  String cache)
        Initializes the event.
        Parameters:
        source - the storage object that triggered the event
        type - the type of event
        name - the name of the variable
        cache - the affected cache, null if none
    • Method Detail

      • getVariables

        public Storage getVariables()
        Returns the storage that triggered the event.
        Returns:
        the source
      • getName

        public String getName()
        Returns the name of the storage item of this event.
        Returns:
        the name
      • getCache

        public String getCache()
        Returns the name of the affected cache.
        Returns:
        the name, null if no cache
      • toString

        public String toString()
        Returns a string representation of the event.
        Overrides:
        toString in class EventObject
        Returns:
        the string representation