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
-
DISABLED
- This mode value indicates that a given service quality attribute
is or must be disabled.
-
DONTCARE
- This mode value indicates that a given service quality attribute
can be either enabled or disabled.
-
ENABLED
- This mode value indicates that a given service quality attribute
is or must be enabled.
-
ServiceQuality(int, String[])
- Initialises a set of service quality attributes to the "don't care"
state.
-
checkCompatibility(ServiceQuality)
- Checks whether another set of service quality attributes is
compatible with this set.
-
clearAttribute(int)
- Clears a given service quality attribute.
-
getAttribute(int)
- Returns the service mode for a given service quality attribute.
-
getLabel(int)
- Get the text label for an indexed service quality attribute.
-
setAttribute(int, int)
- Sets the mode for a given service quality attribute.
DONTCARE
public static final int DONTCARE
- This mode value indicates that a given service quality attribute
can be either enabled or disabled.
ENABLED
public static final int ENABLED
- This mode value indicates that a given service quality attribute
is or must be enabled.
DISABLED
public static final int DISABLED
- This mode value indicates that a given service quality attribute
is or must be disabled.
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.
getLabel
public String getLabel(int i)
- Get the text label for an indexed service quality attribute.
- Parameters:
- i - The indentifier of the attribute.
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.
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.
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.
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