All Packages Class Hierarchy This Package Previous Next Index
Class wrapper.Attribute
java.lang.Object
|
+----wrapper.Attribute
- public class Attribute
- extends Object
-
COUNTER
-
-
COUNTER64
-
-
DATE
-
-
DISPLAYSTRING
-
-
GAUGE
-
-
INTEGER
-
-
INTEGER64
-
-
OCTETSTRING
-
-
READ_ONLY
-
-
READ_WRITE
-
-
UNKNOWN_ACCESS
-
-
UNSUPPORTED
-
-
WRITE_ONLY
-
-
Attribute(Group, String, int, String, String, int, int)
- Constructor.
-
getAccessMode()
- Get related String for an access mode.
-
getDataType()
- Get related String for a data type.
-
getDescription()
- Get the description of this Attribute.
-
getID()
- Get the id of this Attribute.
-
getName()
- Get the name of this Attribute.
-
getValue()
- Get the value of this Attribute.
-
refresh()
- Update the value of this Attribute.
-
setValue(int, String)
- Set the value of this Attribute.
-
toString()
- Attribute in String format.
UNKNOWN_ACCESS
public final int UNKNOWN_ACCESS
READ_ONLY
public final int READ_ONLY
READ_WRITE
public final int READ_WRITE
WRITE_ONLY
public final int WRITE_ONLY
UNSUPPORTED
public final int UNSUPPORTED
COUNTER
public final int COUNTER
COUNTER64
public final int COUNTER64
GAUGE
public final int GAUGE
INTEGER
public final int INTEGER
INTEGER64
public final int INTEGER64
OCTETSTRING
public final int OCTETSTRING
DISPLAYSTRING
public final int DISPLAYSTRING
DATE
public final int DATE
Attribute
public Attribute(Group group,
String name,
int id,
String description,
String pragma,
int accessMode,
int dataType)
- Constructor.
- Parameters:
- group - The Group which contains this Attribute.
- name - The name of this Attribute.
- id - The id of this Attribute.
- description - The description of this Attribute.
- pragma - The pragma of this Attribute.
- accessMode - The access mode of this Attrivute.
E.g., Read-only, read-write, etc.
- dataType - The data type of this Attribute.
E.g., integer, date, string, etc.
getName
public String getName()
- Get the name of this Attribute.
- Returns:
- A String as this Attribute's name.
getID
public int getID()
- Get the id of this Attribute.
- Returns:
- An int as this Attribute's ID
getDescription
public String getDescription()
- Get the description of this Attribute.
- Returns:
- A String as this Attribute's description.
getValue
public String getValue()
- Get the value of this Attribute.
- Returns:
- A String as the value of this Attribute.
refresh
public void refresh() throws DmiError
- Update the value of this Attribute.
- Throws: DmiError
- if cannot get the value of the attribute.
setValue
public void setValue(int setMode,
String value) throws DmiError
- Set the value of this Attribute.
- Parameters:
- setMode - The mode of setting, one of Set, Reserve and Release.
- value - A String as the value of this Attribute.
- Throws: DmiError
- if violate the access mode,
or cannot get the value correctly.
toString
public String toString()
- Attribute in String format.
- Returns:
- A String indicateds id, name, description, pragma, access mode,
data type, and value.
- Overrides:
- toString in class Object
getAccessMode
public String getAccessMode()
- Get related String for an access mode.
- Returns:
- A String indicates the access mode of this Attribute.
getDataType
public String getDataType()
- Get related String for a data type.
- Returns:
- A String indicates the data Type of this Attribute.
All Packages Class Hierarchy This Package Previous Next Index