All Packages Class Hierarchy This Package Previous Next Index
Class uhr.core.attract.ServiceItemStd
java.lang.Object
|
+----uhr.core.attract.ServiceItemStd
- public class ServiceItemStd
- extends Object
- implements ServiceItem
A ServiceItem describes a single available service, aka item.
It's designed for easy matching to a ServiceNeeds.
-
ServiceItemStd()
- Creates a ServiceItem.
-
ServiceItemStd(ServiceHost)
- Creates a ServiceItem with the provided host.
-
getAttractor()
- Returns the attractor.
-
getDescription()
- Returns the description or null if none.
-
getHost()
- Returns the host.
-
getService()
- Returns the service.
-
setAttractor(Attractor)
- Sets the attractor describing the service.
-
setDescription(String)
- Sets the description of the service.
-
setHost(ServiceHost)
- Sets the host that has this service.
-
setService(Object)
- Sets the service this ServiceItem describes.
ServiceItemStd
public ServiceItemStd()
- Creates a ServiceItem.
ServiceItemStd
public ServiceItemStd(ServiceHost host)
- Creates a ServiceItem with the provided host.
setAttractor
public void setAttractor(Attractor attractor)
- Sets the attractor describing the service.
This is a required property.
- Parameters:
- attractor - the attractor describing the service.
getAttractor
public Attractor getAttractor()
- Returns the attractor.
- Returns:
- the attractor.
setService
public void setService(Object service)
- Sets the service this ServiceItem describes. It must be castable
to the type in the attractor. This is a required property.
- Parameters:
- service - the service itself.
- Throws: IllegalArgumentException
- if the service is not of
the correct type. Thus the attractor must be set first.
- Throws: IllegalStateException
- if the attractor is null.
getService
public Object getService()
- Returns the service.
- Returns:
- the service.
setHost
public void setHost(ServiceHost host)
- Sets the host that has this service. This is required.
- Parameters:
- host - the host having this service.
getHost
public ServiceHost getHost()
- Returns the host.
- Returns:
- the host.
setDescription
public void setDescription(String description)
- Sets the description of the service.
- Parameters:
- description - describes the service.
getDescription
public String getDescription()
- Returns the description or null if none.
- Returns:
- the description.
All Packages Class Hierarchy This Package Previous Next Index