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.


Method Index

 o getAttractor()
Returns the attractor.
 o getDescription()
Returns the description or null if none.
 o getHost()
Returns the host.
 o getService()
Returns the service.
 o setAttractor(Attractor)
Sets the attractor describing the service.
 o setDescription(String)
Sets the description of the service.
 o setHost(ServiceHost)
Sets the host that has this service.
 o setService(Object)
Sets the service this ServiceItem describes.

Methods

 o 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.
 o getAttractor
 public abstract Attractor getAttractor()
Returns the attractor.

Returns:
the attractor.
 o 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.
 o getService
 public abstract Object getService()
Returns the service.

Returns:
the service.
 o setHost
 public abstract void setHost(ServiceHost host)
Sets the host that has this service. This is required.

Parameters:
host - the host having this service.
 o getHost
 public abstract ServiceHost getHost()
Returns the host.

Returns:
the host.
 o setDescription
 public abstract void setDescription(String description)
Sets the description of the service.

Parameters:
description - describes the service.
 o getDescription
 public abstract String getDescription()
Returns the description or null if none.

Returns:
the description.

All Packages  Class Hierarchy  This Package  Previous  Next  Index