public class StatusModel extends java.lang.Object implements XMLMarshallable
Java class represents the status of an instance in the SAP CC system.
GetStatusOpThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="status">
<xs:complexType>
<xs:attribute name="isRunning" type="xs:boolean" use="required"/>
<xs:attribute name="startDate" type="xs:dateTime"/>
<xs:attribute name="currentDate" type="xs:dateTime"/>
<xs:attribute name="freeMemory" type="xs:decimal" use="required"/>
<xs:attribute name="totalMemory" type="xs:decimal" use="required"/>
<xs:attribute name="serverStatus" type="ServerStatusType"/>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CURRENTDATE
XML Mapping for the start date: "startDate"
|
static java.lang.String |
FREE_MEMORY
XML Mapping for the free memory: "freeMemory"
|
static java.lang.String |
ISRUNNING
XML Mapping for the running flag: "isRunning"
|
static java.lang.String |
SERVER_STATUS
XML Mapping for the server status: "serverStatus"
|
static java.lang.String |
STARTDATE
XML Mapping for the start date: "startDate"
|
static java.lang.String |
STATUS_MODEL
XML Mapping for the status model: "status"
|
static java.lang.String |
TOTAL_MEMORY
XML Mapping for the total memory: "totalMemory"
|
| Constructor and Description |
|---|
StatusModel() |
StatusModel(ServerStatus serverStatus,
java.util.Date startDate,
java.util.Date currentDate,
long totalMemory,
long freeMemory)
Initializes a new
StatusModel instance with the
running status and the start date of the instance of the SAP CC system |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds string data to this model.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child tag to this model.
|
java.util.Date |
getCurrentDate()
Gets the current date of this instance of the SAP CC system.
|
long |
getFreeMemory()
Gets an estimation of the JVM free memory of the instance of the SAP CC system.
|
ServerStatus |
getServerStatus()
Returns the server status of the SAP CC instance status.
|
java.util.Date |
getStartDate()
Gets the date at which the instance of the SAP CC system has been started.
|
long |
getTotalMemory()
Gets the total memory used by the JVM of the instance of the SAP CC system.
|
boolean |
isRunning()
Returns true if the instance of SAP CC system is running.
|
void |
marshal(XMLOutputter output)
Writes the operation XML data to the given output.
|
void |
setAttributes(XMLAttributes atts)
Sets the operation attributes from the
XMLAttributes. |
void |
setCurrentDate(java.util.Date currentDate)
Sets the current date of this instance of the SAP CC system.
|
void |
setFreeMemory(long freeMemory)
Sets an estimation of the JVM free memory of the instance of the SAP CC system.
|
void |
setIsRunning(boolean isRunning)
Deprecated.
Use
setServerStatus(ServerStatus).
|
void |
setServerStatus(ServerStatus serverStatus)
Sets the server status of the SAP CC instance status.
|
void |
setStartDate(java.util.Date startDate)
Sets the date at which the instance of the SAP CC system has been started
|
void |
setTotalMemory(long totalMemory)
Sets the total memory of the instance of the SAP CC system.
|
public static final java.lang.String STATUS_MODEL
public static final java.lang.String ISRUNNING
public static final java.lang.String STARTDATE
public static final java.lang.String CURRENTDATE
public static final java.lang.String TOTAL_MEMORY
public static final java.lang.String FREE_MEMORY
public static final java.lang.String SERVER_STATUS
public StatusModel()
public StatusModel(ServerStatus serverStatus, java.util.Date startDate, java.util.Date currentDate, long totalMemory, long freeMemory)
StatusModel instance with the
running status and the start date of the instance of the SAP CC system
serverStatus - startDate - The date when the server was startedcurrentDate - The current date of the servertotalMemory - The total available memory in the JVMfreeMemory - The free available memory in the JVMRuntime.freeMemory(),
Runtime.totalMemory()public java.util.Date getStartDate()
null otherwisepublic void setStartDate(java.util.Date startDate)
startDate - The start datepublic java.util.Date getCurrentDate()
public void setCurrentDate(java.util.Date currentDate)
currentDate - The current instance datepublic boolean isRunning()
true if the system instance is running, false otherwize.@Deprecated public void setIsRunning(boolean isRunning)
setServerStatus(ServerStatus).
setIsRunning(true) is equivalent to setServerStatus(ServerStatus.on)setIsRunning(false) is equivalent to setServerStatus(ServerStatus.off)isRunning - The running statuspublic long getFreeMemory()
public void setFreeMemory(long freeMemory)
freeMemory - The free memory of the JVMpublic long getTotalMemory()
public void setTotalMemory(long totalMemory)
totalMemory - The total memory of the JVMpublic ServerStatus getServerStatus()
public void setServerStatus(ServerStatus serverStatus)
serverStatus - The server status of the SAP CC instance status.public void setAttributes(XMLAttributes atts)
XMLAttributes.setAttributes in interface XMLMarshallableatts - The XMLAttributes containing the datapublic void addChild(java.lang.String tagName,
XMLMarshallable child)
This tag is ignored for this model.
addChild in interface XMLMarshallabletagName - The name of the tagchild - The XMLMarshallable child to addpublic void addCharacterData(java.lang.String cData)
This data is ignored for this model.
addCharacterData in interface XMLMarshallablecData - The character data to add to the operationpublic void marshal(XMLOutputter output)
marshal in interface XMLMarshallableoutput - The XMLOutputter to write into