SAP CC 1.0
API 4.2 (Core)

com.highdeal.admin.hci
Class StatusModel

java.lang.Object
  extended by com.highdeal.admin.hci.StatusModel
All Implemented Interfaces:
XMLMarshallable

public class StatusModel
extends java.lang.Object
implements XMLMarshallable

This class represents the status of the server.


XML Schema 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="freeMemory" type="xs:decimal" use="required"/>
    <xs:attribute name="totalMemory" type="xs:decimal" use="required"/>
  </xs:complexType>
</xs:element>

Field Summary
static java.lang.String FREE_MEMORY
          Mapping for the free memory : "freeMemory".
static java.lang.String ISRUNNING
          Mapping for the running flag : "isRunning".
static java.lang.String STARTDATE
          Mapping for the start date : "startDate".
static java.lang.String STATUS_MODEL
          Mapping for the status model : "status".
static java.lang.String TOTAL_MEMORY
          Mapping for the total memory : "totalMemory".
 
Constructor Summary
StatusModel()
           
StatusModel(boolean isRunning, java.util.Date startDate, long totalMemory, long freeMemory)
          Initializes a new StatusModel instance with the running status and the start date of the server.
 
Method Summary
 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.
 long getFreeMemory()
          Gets an estimation of the JVM free memory of the server.
 java.util.Date getStartDate()
          Gets the date at which the server has been started.
 long getTotalMemory()
          Gets the total memory used by the JVM of the server.
 boolean isRunning()
          Returns true if the server 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 setFreeMemory(long freeMemory)
          Sets an estimation of the JVM free memory of the server.
 void setIsRunning(boolean isRunning)
          Sets the running status of the server.
 void setStartDate(java.util.Date startDate)
          Sets the date at which the server has been started.
 void setTotalMemory(long totalMemory)
          Sets the total memory of the server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_MODEL

public static final java.lang.String STATUS_MODEL
Mapping for the status model : "status".

See Also:
Constant Field Values

ISRUNNING

public static final java.lang.String ISRUNNING
Mapping for the running flag : "isRunning".

See Also:
Constant Field Values

STARTDATE

public static final java.lang.String STARTDATE
Mapping for the start date : "startDate".

See Also:
Constant Field Values

TOTAL_MEMORY

public static final java.lang.String TOTAL_MEMORY
Mapping for the total memory : "totalMemory".

See Also:
Constant Field Values

FREE_MEMORY

public static final java.lang.String FREE_MEMORY
Mapping for the free memory : "freeMemory".

See Also:
Constant Field Values
Constructor Detail

StatusModel

public StatusModel()

StatusModel

public StatusModel(boolean isRunning,
                   java.util.Date startDate,
                   long totalMemory,
                   long freeMemory)
Initializes a new StatusModel instance with the running status and the start date of the server.

totalMemory is the total memory of the JVM on StatusModel creation. freeMemory is the free memory of the JVM on StatusModel creation.

Parameters:
isRunning - flag indicating if the server is running
startDate - the date when the server was started
totalMemory - The total available memory in the JVM
freeMemory - The free available memory in the JVM
See Also:
Runtime.freeMemory(), Runtime.totalMemory()
Method Detail

getStartDate

public java.util.Date getStartDate()
Gets the date at which the server has been started.

Returns:
the server start date if the server is started and null otherwise.

setStartDate

public void setStartDate(java.util.Date startDate)
Sets the date at which the server has been started.

Parameters:
startDate - the server start date.

isRunning

public boolean isRunning()
Returns true if the server is running.

Returns:
true if the server is running, false otherwize.

setIsRunning

public void setIsRunning(boolean isRunning)
Sets the running status of the server.

Parameters:
isRunning - the running status.

getFreeMemory

public long getFreeMemory()
Gets an estimation of the JVM free memory of the server.

Returns:
the free memory of the JVM

setFreeMemory

public void setFreeMemory(long freeMemory)
Sets an estimation of the JVM free memory of the server.

Parameters:
freeMemory - the free memory of the JVM

getTotalMemory

public long getTotalMemory()
Gets the total memory used by the JVM of the server.

Returns:
the total memory of the server

setTotalMemory

public void setTotalMemory(long totalMemory)
Sets the total memory of the server

Parameters:
totalMemory - the total memory of the server

setAttributes

public void setAttributes(XMLAttributes atts)
Sets the operation attributes from the XMLAttributes.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - the XMLAttributes containing the data

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Adds a child tag to this model.

This tag is ignored for this model.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - the name of the tag
child - the XMLMarshallable child to add

addCharacterData

public void addCharacterData(java.lang.String cData)
Adds string data to this model.

This data is ignored for this model.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - the character data to add to the operation

marshal

public void marshal(XMLOutputter output)
Writes the operation XML data to the given output.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - the XMLOutputter to write into

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.