All Packages Class Hierarchy This Package Previous Next Index
Interface uhr.core.attract.ServiceItem
- public interface ServiceItem
A ServiceItem describes a single available service, aka item.
It's designed for easy matching to a ServiceNeeds.
-
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.
setAttractor
public abstract void setAttractor(Attractor attractor)
- Sets the attractor describing the service.
This is a required property.
- Parameters:
- attractor - the attractor describing the service.
getAttractor
public abstract Attractor getAttractor()
- Returns the attractor.
- Returns:
- the attractor.
setService
public abstract 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 abstract Object getService()
- Returns the service.
- Returns:
- the service.
setHost
public abstract void setHost(ServiceHost host)
- Sets the host that has this service. This is required.
- Parameters:
- host - the host having this service.
getHost
public abstract ServiceHost getHost()
- Returns the host.
- Returns:
- the host.
setDescription
public abstract void setDescription(String description)
- Sets the description of the service.
- Parameters:
- description - describes the service.
getDescription
public abstract String getDescription()
- Returns the description or null if none.
- Returns:
- the description.
All Packages Class Hierarchy This Package Previous Next Index