org.glite.ce.monitorapij.resource
Class ResourceEvent

java.lang.Object
  extended byorg.glite.ce.monitorapij.resource.ResourceEvent

public class ResourceEvent
extends java.lang.Object

This class represents an event regarding a particular set of resources. This event informs the CEMonitor that a set of resources has been added, removed or updated.

Author:
Luigi Zangrando (zangrando@pd.infn.it)

Field Summary
static int RESOURCE_ADDED
           
static int RESOURCE_REMOVED
           
static int RESOURCE_UPDATED
           
 
Constructor Summary
ResourceEvent(ResourceHolder holder, int eventID, Resource[] resources)
          Creates a new ResourceEvent object.
 
Method Summary
 int getEvent()
          Get the identifier of the type of this event.
 ResourceHolder getResourceHolder()
          Get the ResourceHolder holding the Resources which produced this event.
 Resource[] getResources()
          Get an array of the Resources which produced this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_ADDED

public static final int RESOURCE_ADDED
See Also:
Constant Field Values

RESOURCE_REMOVED

public static final int RESOURCE_REMOVED
See Also:
Constant Field Values

RESOURCE_UPDATED

public static final int RESOURCE_UPDATED
See Also:
Constant Field Values
Constructor Detail

ResourceEvent

public ResourceEvent(ResourceHolder holder,
                     int eventID,
                     Resource[] resources)
Creates a new ResourceEvent object.

Parameters:
holder - The ResourceHolder holding the resources
eventID - The int representing the event type identifier.
resources - An array of the Resources which produced this event.
Method Detail

getResourceHolder

public ResourceHolder getResourceHolder()
Get the ResourceHolder holding the Resources which produced this event.

Returns:
The ResourceHolder of this event.

getResources

public Resource[] getResources()
Get an array of the Resources which produced this event.

Returns:
The array of the Resources which produced this event.

getEvent

public int getEvent()
Get the identifier of the type of this event.

Returns:
An int identifying the event type ( RESOURCE_ADDED = 0;RESOURCE_REMOVED = 1;RESOURCE_UPDATED = 2).