org.jmythapi.protocol.response.impl
Class Uptime

java.lang.Object
  extended by org.jmythapi.impl.AData<E>
      extended by org.jmythapi.protocol.response.impl.AMythResponse<IUptime.Props>
          extended by org.jmythapi.protocol.response.impl.Uptime
All Implemented Interfaces:
Cloneable, IPropertyAware<IUptime.Props>, IVersionable, ISendable, IMythResponse<IUptime.Props>, IUptime

public class Uptime
extends AMythResponse<IUptime.Props>
implements IUptime


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jmythapi.protocol.response.IUptime
IUptime.Props
 
Field Summary
 
Fields inherited from class org.jmythapi.impl.AData
logger, propsClass, protoVersion, respArgs
 
Constructor Summary
Uptime(IMythPacket packet)
           
Uptime(ProtocolVersion protoVersion)
           
 
Method Summary
 Date getStartupTime()
          Gts the startup time of the backend.
 Date getStartupTime(Date uptimeLoadedDate)
           
 Integer getUptimeSeconds()
          Gets the uptime in seconds
 Integer getUptimeSeconds(Date uptimeLoadedDate)
           
 void setUptimeSeconds(int seconds)
           
 
Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse
checkSize, decodeProperty, encodeProperty, getExpectedSize, getPacket, getProperties, getProperty, getPropertyIndex
 
Methods inherited from class org.jmythapi.impl.AData
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 
Methods inherited from interface org.jmythapi.IPropertyAware
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject
 

Constructor Detail

Uptime

public Uptime(IMythPacket packet)

Uptime

public Uptime(ProtocolVersion protoVersion)
Method Detail

getUptimeSeconds

public Integer getUptimeSeconds()
Description copied from interface: IUptime
Gets the uptime in seconds

Specified by:
getUptimeSeconds in interface IUptime
Returns:
the uptime in seconds or -1 if unknown
See Also:
IUptime.Props.UPTIME_SECONDS

getUptimeSeconds

public Integer getUptimeSeconds(Date uptimeLoadedDate)
Specified by:
getUptimeSeconds in interface IUptime

setUptimeSeconds

public void setUptimeSeconds(int seconds)

getStartupTime

public Date getStartupTime()
Description copied from interface: IUptime
Gts the startup time of the backend.

This date/time is calculated using the uptime in seconds.

Specified by:
getStartupTime in interface IUptime
Returns:
the backend startup time

getStartupTime

public Date getStartupTime(Date uptimeLoadedDate)
Specified by:
getStartupTime in interface IUptime


Copyright © 2008-2013. All Rights Reserved.