All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.commerce.ServiceQuality

java.lang.Object
   |
   +----semper.commerce.ServiceQuality

public abstract class ServiceQuality
extends Object
implements Serializable, Cloneable
This is the base class for all classes managing service quality attributes. Each attribute is represented by a tuple consisting of attribute type identifier and mode. The mode specifies whether the given service quality attribute must be enabled or disabled or in a "don't care" state.

Version:
$Id: ServiceQuality.java,v 1.5 1998/07/09 09:14:10 semper Exp $
Author:
Rolf Michelsen, Stig Mjolsnes
See Also:
DealQuality

Variable Index

 o DISABLED
This mode value indicates that a given service quality attribute is or must be disabled.
 o DONTCARE
This mode value indicates that a given service quality attribute can be either enabled or disabled.
 o ENABLED
This mode value indicates that a given service quality attribute is or must be enabled.

Constructor Index

 o ServiceQuality(int, String[])
Initialises a set of service quality attributes to the "don't care" state.

Method Index

 o checkCompatibility(ServiceQuality)
Checks whether another set of service quality attributes is compatible with this set.
 o clearAttribute(int)
Clears a given service quality attribute.
 o getAttribute(int)
Returns the service mode for a given service quality attribute.
 o getLabel(int)
Get the text label for an indexed service quality attribute.
 o setAttribute(int, int)
Sets the mode for a given service quality attribute.

Variables

 o DONTCARE
 public static final int DONTCARE
This mode value indicates that a given service quality attribute can be either enabled or disabled.

 o ENABLED
 public static final int ENABLED
This mode value indicates that a given service quality attribute is or must be enabled.

 o DISABLED
 public static final int DISABLED
This mode value indicates that a given service quality attribute is or must be disabled.

Constructors

 o ServiceQuality
 public ServiceQuality(int attributeCount,
                       String s[])
Initialises a set of service quality attributes to the "don't care" state. Sets the text label for a given service quality attribute.

Parameters:
attributeCount - The total number of service attributes that can be set for the service.
s - The array of strings to be set.

Methods

 o getLabel
 public String getLabel(int i)
Get the text label for an indexed service quality attribute.

Parameters:
i - The indentifier of the attribute.
 o setAttribute
 public void setAttribute(int attribute,
                          int mode)
Sets the mode for a given service quality attribute. The mode must be ENABLED, DISABLED or DONTCARE.

Parameters:
attribute - The identifier of the attribute to be set.
mode - The service mode for this service attribute.
 o clearAttribute
 public void clearAttribute(int attribute)
Clears a given service quality attribute. This is equivalent to setting the mode of this attribute to DONTCARE.

Parameters:
attribute - The identifier of the attribute to be cleared.
 o getAttribute
 public int getAttribute(int attribute)
Returns the service mode for a given service quality attribute.

Returns:
The service mode for the service quality attribute.
 o checkCompatibility
 public abstract boolean checkCompatibility(ServiceQuality qos)
Checks whether another set of service quality attributes is compatible with this set. A minimal requirement for two sets of quality attributes to be compatible is that one set specifies a given attribute as "enabled" while another specifies it as "disabled". Additional requirements might also be imposed as a consequence of dependencies between different attributes.

Parameters:
qos - A set of service quality attributes.
Returns:
true if the two sets of service quality attributes are compatible.

All Packages  Class Hierarchy  This Package  Previous  Next  Index