org.gridbus.broker.common
Class Service
java.lang.Object
org.gridbus.broker.common.Service
- Direct Known Subclasses:
- ApplicationService, ComputeServer, DataHost, InformationService
public abstract class Service
- extends java.lang.Object
- Author:
- krishna
The abstract class Service defines a template for Services which are available on the grid.
Eg: Compute, Application, DataHost, Information
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Service
public Service()
getServiceType
public abstract int getServiceType()
- Returns:
- Returns the type of the service (One of the contants in ServiceType class).
getId
public long getId()
- Returns:
- Returns the id.
isAvailable
public boolean isAvailable()
- Checks if this service is available or not,
that is whether it is reachable and responding to queries.
- Returns:
- true if this service is available, false otherwise
setAvailable
public void setAvailable(boolean alive)
- Sets the available flag
- Parameters:
available -
getApplicationID
protected java.lang.String getApplicationID()
- Returns:
- Returns the applicationID.
setApplicationID
public void setApplicationID(java.lang.String applicationID)
- Parameters:
applicationID - The applicationID to set.
getName
public java.lang.String getName()
- Returns:
- Returns the name.
setName
public void setName(java.lang.String name)
- Parameters:
name - The name to set.
discoverProperties
protected abstract boolean discoverProperties(UserCredential uc)
throws GridBrokerException
- Discover properties should be implemented by all subclasses.
At the very least, this should inform the caller about
the availability of the (remote) service, and also set the "available"
field of the service object.
- Parameters:
uc - (credentials used to connect to the service, if any)
- Returns:
- true if the service is available, false otherwise.
- Throws:
GridBrokerException
getMappingID
public java.lang.String getMappingID()
- Returns:
- Returns the mappingID.
setMappingID
public void setMappingID(java.lang.String mappingID)
- Parameters:
mappingID - The mappingID to set.