jade.core
Class ServiceDescriptor

java.lang.Object
  extended by jade.core.ServiceDescriptor
All Implemented Interfaces:
java.io.Serializable

public class ServiceDescriptor
extends java.lang.Object
implements Serializable

The ServiceDescriptor class serves as a meta-level description of a kernel-level service. Instances of this class contain a Service object, along with its name and properties, and are used in service management operations, as well as in agent-level introspection of platform-level entities.

Author:
Giovanni Rimassa - FRAMeTech s.r.l.
See Also:
Service, Serialized Form

Constructor Summary
ServiceDescriptor()
          Builds an uninitialized service descriptor.
ServiceDescriptor(java.lang.String sn, Service svc)
          Builds a new service descriptor, describing the given service with the given name and properties.
 
Method Summary
 java.lang.String getName()
          Retrieve the name (if any) of the described service.
 Service getService()
          Retrieve the described service.
 boolean isMandatory()
           
 void setMandatory(boolean isMandatory)
           
 void setName(java.lang.String sn)
          Change the name (if any) of the described service.
 void setService(Service svc)
          Change the described service (if any).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDescriptor

public ServiceDescriptor(java.lang.String sn,
                         Service svc)
Builds a new service descriptor, describing the given service with the given name and properties.

Parameters:
sn - The name of the described service.
svc - The described Service object.

ServiceDescriptor

public ServiceDescriptor()
Builds an uninitialized service descriptor.

See Also:
setName(String sn), setService(Service svc)
Method Detail

setName

public void setName(java.lang.String sn)
Change the name (if any) of the described service.

Parameters:
sn - The name to assign to the described service.

getName

public java.lang.String getName()
Retrieve the name (if any) of the described service.

Returns:
The name of the described service, or null if no name was set.

setService

public void setService(Service svc)
Change the described service (if any).

Parameters:
svc - The Service object that is to be described by this service descriptor.

getService

public Service getService()
Retrieve the described service.

Returns:
The Service object described by this service descriptor, or null if no service was set.

setMandatory

public void setMandatory(boolean isMandatory)

isMandatory

public boolean isMandatory()