public class InstanceStatus extends Object implements XMLMarshallable
Java class represents an instance status that describes the running status (on, off, waiting) of a specific instance of the SAP CC system;
It contains a list of instance properties.InstanceProperty,
SystemStatusThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="instanceStatus">
<xs:complexType>
<xs:sequence>
<xs:element ref="instanceProperty" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="instanceId" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="((dispatcher|updater|rater|guider|bulkLoader|taxer)#\d)"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="status" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="(on|off|waiting)"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_NAME
The XML tag name of this class: "instanceStatus"
|
| Constructor and Description |
|---|
InstanceStatus()
InstanceStatus default constructor
|
InstanceStatus(InstanceId instanceId,
InstanceInfo instanceInfo)
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBooleanProperty(String name,
boolean value)
Add a property the instance given its name and value as the boolean
|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
addDateProperty(String name,
Date value)
Add a property the instance given its name and value as the date
|
void |
addDecimalProperty(String name,
BigDecimal value)
Add a property the instance given its name and value as the big decimal
|
void |
addIntegerProperty(String name,
int value)
Add a property the instance given its name and value as the integer
|
void |
addLongProperty(String name,
long value)
Add a property the instance given its name and value as the long
|
void |
addProperty(String name,
String value)
Add a property the instance given its name and value as the string
|
List<String> |
getAllPropertyNames()
Get the names of all the
properties defined in this object |
boolean |
getBooleanProperty(String name)
Get an instance property as a boolean given its name
|
Date |
getDateProperty(String name)
Get an instance property as a date given its name
|
BigDecimal |
getDecimalProperty(String name)
Get an instance property as a big decimal given its name
|
InstanceId |
getInstanceId()
Get the instance identifier
|
InstanceInfo |
getInstanceInfo()
Get the instance info
|
Integer |
getIntegerProperty(String name)
Get an instance property as an integer given its name
|
Long |
getLongProperty(String name)
Get an instance property as a long given its name
|
String |
getProperty(String name)
Get an
instance property as a string given its name |
ServerStatus |
getStatus()
Returns the status of the instance of the SAP CC system
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setStatus(ServerStatus status)
Set the instance status
|
public static final String TAG_NAME
public InstanceStatus()
public InstanceStatus(InstanceId instanceId, InstanceInfo instanceInfo)
instanceId - The specified InstanceIdinstanceInfo - The specified InstanceInfopublic ServerStatus getStatus()
public void setStatus(ServerStatus status)
status - The instance status to setpublic InstanceId getInstanceId()
public InstanceInfo getInstanceInfo()
InstanceInfopublic String getProperty(String name)
instance property as a string given its namename - The property namenullpublic List<String> getAllPropertyNames()
properties defined in this objectproperties defined in this objectpublic BigDecimal getDecimalProperty(String name)
name - The property namepublic Date getDateProperty(String name)
name - The property namepublic boolean getBooleanProperty(String name)
name - The property namepublic Integer getIntegerProperty(String name)
name - The property namepublic Long getLongProperty(String name)
name - The property namepublic void addProperty(String name, String value)
name - The property name to addvalue - The property value as a string to addpublic void addDecimalProperty(String name, BigDecimal value)
name - The property name to addvalue - The property value as a big decimal to addpublic void addDateProperty(String name, Date value)
name - The property name to addvalue - The property value as a date to addpublic void addBooleanProperty(String name, boolean value)
name - The property name to addvalue - The property value as a boolean to addpublic void addIntegerProperty(String name, int value)
name - The property name to addvalue - The property value as a integer to addpublic void addLongProperty(String name, long value)
name - The property name to addvalue - The property value as a long to addpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into