org.glite.ce.monitorapij.resource
Interface Resource

All Known Implementing Classes:
AbstractSensor, Action, CEMonResource, Subscription

public interface Resource

Instances of classes that implement this interface are used to store information about a resource like a sensor. This classes are intended as plugins for the CEMonitor passed as jar files. It is also used for actions and subscriptions.

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

Method Summary
 boolean exists()
          Check if this resource still exists.
 java.util.Calendar getCreationTime()
          Get the creation time.
 java.lang.Integer getId()
          Get the Integer identifying this resource.
 org.apache.axis.types.URI getJarPath()
          Get the URI representing the path to the jar file of this resource.
 java.lang.String getName()
          Get the name of this resource.
 Property[] getProperty()
          Get the array of the all Propertys of this resource.
 Property getProperty(int i)
          Get a Property specifying its array index.
 Property getProperty(java.lang.String key)
          Get a Property specifying its name
 java.lang.String getType()
          Get the type of this resource.
 boolean isNew()
          Check if this resource has recently been added (i.e.
 java.util.Calendar lastModified()
          Get the time of the last modification occurred to this resource.
 void setCreationTime(java.util.Calendar time)
          Set the time of the last modification occurred to this resource.
 void setId(int id)
          Set the int identifying this resource.
 void setId(java.lang.Integer id)
          Set the Integer identifying this resource.
 void setJarPath(org.apache.axis.types.URI JARPath)
          Set the URI representing the path to the jar file of this resource.
 void setName(java.lang.String name)
          Set the name of this resource.
 void setNew(boolean b)
          Set the "new" flag of this resource.
 void setProperty(int i, Property value)
          Set the Property array slot specified by i to the Property specified by value.
 void setProperty(Property[] properties)
          Set the array of the all Propertys of this resource.
 void setType(java.lang.String type)
          Set the type of this resource.
 

Method Detail

isNew

public boolean isNew()
Check if this resource has recently been added (i.e. inserted its jar in the jar directory).

Returns:
True if this resource is new, false otherwise.

setNew

public void setNew(boolean b)
Set the "new" flag of this resource.

Parameters:
b - The value of the "new" flag.

exists

public boolean exists()
Check if this resource still exists.

Returns:
True if the resource exists, false otherwise.

getId

public java.lang.Integer getId()
Get the Integer identifying this resource.

Returns:
The Integer identifying this resource.

setId

public void setId(int id)
Set the int identifying this resource.


setId

public void setId(java.lang.Integer id)
Set the Integer identifying this resource.


getName

public java.lang.String getName()
Get the name of this resource.

Returns:
The name of this resource.

setName

public void setName(java.lang.String name)
Set the name of this resource.

Parameters:
name - The name of this resource.

getType

public java.lang.String getType()
Get the type of this resource.

Returns:
The type of this resource.

setType

public void setType(java.lang.String type)
Set the type of this resource.


getCreationTime

public java.util.Calendar getCreationTime()
Get the creation time.

Returns:
The creation time.

lastModified

public java.util.Calendar lastModified()
Get the time of the last modification occurred to this resource.

Returns:
The time of the last modification to this resource.

setCreationTime

public void setCreationTime(java.util.Calendar time)
Set the time of the last modification occurred to this resource.

Parameters:
time - The time of the last modification to this resource.

getJarPath

public org.apache.axis.types.URI getJarPath()
Get the URI representing the path to the jar file of this resource.

Returns:
The path to the jar of this resource.

setJarPath

public void setJarPath(org.apache.axis.types.URI JARPath)
Set the URI representing the path to the jar file of this resource.

Parameters:
JARPath - The path to the jar of this resource.

getProperty

public Property getProperty(java.lang.String key)
Get a Property specifying its name

Parameters:
key - The name of the property.
Returns:
The searched Property if it exists.

getProperty

public Property getProperty(int i)
Get a Property specifying its array index.

Parameters:
i - The array index of the searched Property.
Returns:
The searched Property.

getProperty

public Property[] getProperty()
Get the array of the all Propertys of this resource.

Returns:
The array of the all Propertys of this resource.

setProperty

public void setProperty(Property[] properties)
Set the array of the all Propertys of this resource.


setProperty

public void setProperty(int i,
                        Property value)
Set the Property array slot specified by i to the Property specified by value.

Parameters:
i - The index of the Property array where to put the new Property.
value - The new Property.