edu.isi.pegasus.planner.classes
Class Notifications

java.lang.Object
  extended by edu.isi.pegasus.planner.classes.Data
      extended by edu.isi.pegasus.planner.classes.Notifications
All Implemented Interfaces:
Cloneable

public class Notifications
extends Data

A container class that stores all the notifications that need to be done indexed by the various conditions.

Version:
$Revision: 3833 $
Author:
Karan Vahi

Field Summary
private  EnumMap<Invoke.WHEN,List<Invoke>> mInvokeMap
          An enum map that associates the various notification events with the list of actions that need to be taken.
 
Fields inherited from class edu.isi.pegasus.planner.classes.Data
mLogger, mLogMsg
 
Constructor Summary
Notifications()
          The default constructor.
 
Method Summary
 void add(Invoke notification)
          Adds a Invoke object correpsonding to a notification.
private  void addAll(Invoke.WHEN when, Collection<Invoke> invokes)
          Convenience method at add all the notifications corresponding to a particular event
 void addAll(Notifications notifications)
          Adds all the notifications passed to the underlying container.
 Object clone()
          Returns the clone of the object.
 Collection<Invoke> getNotifications(Invoke.WHEN when)
          Returns a collection of all the notifications that need to be done for a particular condition
 boolean isEmpty()
          Returns a boolean indicating whether the notifications object is empty or not.
 void reset()
          Resets the internal invoke map.
 String toString()
          Returns a String description of the object
 
Methods inherited from class edu.isi.pegasus.planner.classes.Data
setToString, vectorToString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mInvokeMap

private EnumMap<Invoke.WHEN,List<Invoke>> mInvokeMap
An enum map that associates the various notification events with the list of actions that need to be taken.

Constructor Detail

Notifications

public Notifications()
The default constructor.

Method Detail

reset

public void reset()
Resets the internal invoke map.


add

public void add(Invoke notification)
Adds a Invoke object correpsonding to a notification.

Parameters:
notification - the notification object

addAll

public void addAll(Notifications notifications)
Adds all the notifications passed to the underlying container.

Parameters:
notifications - the notification object

getNotifications

public Collection<Invoke> getNotifications(Invoke.WHEN when)
Returns a collection of all the notifications that need to be done for a particular condition

Parameters:
when - the condition
Returns:

isEmpty

public boolean isEmpty()
Returns a boolean indicating whether the notifications object is empty or not.

Returns:
true if empty else false

clone

public Object clone()
Returns the clone of the object.

Overrides:
clone in class Object
Returns:
the clone

toString

public String toString()
Returns a String description of the object

Specified by:
toString in class Data
Returns:

addAll

private void addAll(Invoke.WHEN when,
                    Collection<Invoke> invokes)
Convenience method at add all the notifications corresponding to a particular event

Parameters:
when - when does the event happen
notifications - the list of notificiations


Copyright © 2011 The University of Southern California. All Rights Reserved.