Package com.highdeal.admin.hci
Class StatusModel
java.lang.Object
com.highdeal.admin.hci.StatusModel
- All Implemented Interfaces:
XMLMarshallable
This
Java class represents the status of an instance in the SAP CC system.
- Running status
- Start date of the instance of the SAP CC system
- Current local date of the system instance
- Current free memory of the JVM
- Total memory of the JVM
- See Also:
XML API for HCI
The 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="licenseHardwareKey" type="xs:string"/>
<xs:attribute name="licenseExpirationDate" type="xs:dateTime" />
<xs:attribute name="serverStatus" type="ServerStatusType"/>
</xs:complexType>
</xs:element>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML Mapping for the start date: "startDate"static final StringXML Mapping for the free memory: "freeMemory"static final StringXML Mapping for the running flag: "isRunning"static final StringXML Mapping for the license expiration date: "licenseExpirationDate"static final StringXML Mapping for the license hardware key: "licenseHardwareKey"static final StringXML Mapping for the server status: "serverStatus"static final StringXML Mapping for the start date: "startDate"static final StringXML Mapping for the status model: "status"static final StringXML Mapping for the total memory: "totalMemory" -
Constructor Summary
ConstructorsConstructorDescriptionStatusModel(ServerStatus serverStatus, Date startDate, Date currentDate, long totalMemory, long freeMemory, String licenseHardwareKey, Date licenseExpirationDate) Initializes a newStatusModelinstance with the running status and the start date of the instance of the SAP CC system -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds string data to this model.voidaddChild(String tagName, XMLMarshallable child) Adds a child tag to this model.Gets the current date of this instance of the SAP CC system.longGets an estimation of the JVM free memory of the instance of the SAP CC system.Returns the expiration date of the license.Returns the hardware key of the SAP CC instance used by the license.Returns the server status of the SAP CC instance status.Gets the date at which the instance of the SAP CC system has been started.longGets the total memory used by the JVM of the instance of the SAP CC system.booleanReturns true if the instance of SAP CC system is running.voidmarshal(XMLOutputter output) Writes the operation XML data to the given output.voidsetAttributes(XMLAttributes atts) Sets the operation attributes from theXMLAttributes.voidsetCurrentDate(Date currentDate) Sets the current date of this instance of the SAP CC system.voidsetFreeMemory(long freeMemory) Sets an estimation of the JVM free memory of the instance of the SAP CC system.voidsetIsRunning(boolean isRunning) Deprecated.voidsetLicenseExpirationDate(Date licenseExpirationDate) Sets the expiration date of the license.voidsetLicenseHardwareKey(String licenseHardwareKey) Sets the hardware key of the SAP CC instance used by the license.voidsetServerStatus(ServerStatus serverStatus) Sets the server status of the SAP CC instance status.voidsetStartDate(Date startDate) Sets the date at which the instance of the SAP CC system has been startedvoidsetTotalMemory(long totalMemory) Sets the total memory of the instance of the SAP CC system.
-
Field Details
-
STATUS_MODEL
XML Mapping for the status model: "status"- See Also:
-
ISRUNNING
XML Mapping for the running flag: "isRunning"- See Also:
-
STARTDATE
XML Mapping for the start date: "startDate"- See Also:
-
CURRENTDATE
XML Mapping for the start date: "startDate"- See Also:
-
TOTAL_MEMORY
XML Mapping for the total memory: "totalMemory"- See Also:
-
FREE_MEMORY
XML Mapping for the free memory: "freeMemory"- See Also:
-
SERVER_STATUS
XML Mapping for the server status: "serverStatus"- See Also:
-
LICENSE_HARDWARE_KEY
XML Mapping for the license hardware key: "licenseHardwareKey"- See Also:
-
LICENSE_EXPIRATION_DATE
XML Mapping for the license expiration date: "licenseExpirationDate"- See Also:
-
-
Constructor Details
-
StatusModel
public StatusModel() -
StatusModel
public StatusModel(ServerStatus serverStatus, Date startDate, Date currentDate, long totalMemory, long freeMemory, String licenseHardwareKey, Date licenseExpirationDate) Initializes a newStatusModelinstance with the running status and the start date of the instance of the SAP CC system- totalMemory is the total memory of the JVM on StatusModel creation
- freeMemory is the free memory of the JVM on StatusModel creation
- Parameters:
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 JVMlicenseHardwareKey- The hardware key of the licenselicenseExpirationDate- The expiration date of the license- See Also:
-
-
Method Details
-
getStartDate
Gets the date at which the instance of the SAP CC system has been started.- Returns:
- The instance start date if the instance is started;
nullotherwise
-
setStartDate
Sets the date at which the instance of the SAP CC system has been started- Parameters:
startDate- The start date
-
getCurrentDate
Gets the current date of this instance of the SAP CC system.- Returns:
- The current instance date
-
setCurrentDate
Sets the current date of this instance of the SAP CC system.- Parameters:
currentDate- The current instance date
-
isRunning
public boolean isRunning()Returns true if the instance of SAP CC system is running.- Returns:
trueif the system instance is running,falseotherwize.
-
setIsRunning
Deprecated.UsesetServerStatus(ServerStatus).setIsRunning(true)is equivalent to setServerStatus(ServerStatus.on)setIsRunning(false)is equivalent to setServerStatus(ServerStatus.off)
Sets the running status of the system instance.- Parameters:
isRunning- The running status
-
getFreeMemory
public long getFreeMemory()Gets an estimation of the JVM free memory of the instance of the SAP CC system.- Returns:
- The free memory of the JVM
-
setFreeMemory
public void setFreeMemory(long freeMemory) Sets an estimation of the JVM free memory of the instance of the SAP CC system.- Parameters:
freeMemory- The free memory of the JVM
-
getTotalMemory
public long getTotalMemory()Gets the total memory used by the JVM of the instance of the SAP CC system.- Returns:
- The total memory of the JVM
-
setTotalMemory
public void setTotalMemory(long totalMemory) Sets the total memory of the instance of the SAP CC system.- Parameters:
totalMemory- The total memory of the JVM
-
getServerStatus
Returns the server status of the SAP CC instance status.- Returns:
- the server status of the SAP CC instance status..
-
setServerStatus
Sets the server status of the SAP CC instance status.- Parameters:
serverStatus- The server status of the SAP CC instance status.
-
getLicenseHardwareKey
Returns the hardware key of the SAP CC instance used by the license.- Returns:
- the hardware key of the SAP CC instance used by the license
-
setLicenseHardwareKey
Sets the hardware key of the SAP CC instance used by the license.- Parameters:
licenseHardwareKey- the hardware key of the SAP CC instance used by the license
-
getLicenseExpirationDate
Returns the expiration date of the license.- Returns:
- the expiration date of the license
-
setLicenseExpirationDate
Sets the expiration date of the license.- Parameters:
licenseExpirationDate- the expiration date of the license
-
setAttributes
Sets the operation attributes from theXMLAttributes.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXMLAttributescontaining the data
-
addChild
Adds a child tag to this model.This tag is ignored for this model.
- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of the tagchild- TheXMLMarshallablechild to add
-
addCharacterData
Adds string data to this model.This data is ignored for this model.
- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to add to the operation
-
marshal
Writes the operation XML data to the given output.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXMLOutputterto write into
-
setServerStatus(ServerStatus).