org.dxc.api.datatypes
Class DxcData

Object
  extended by org.dxc.api.datatypes.DxcData
Direct Known Subclasses:
CommandData, DiagnosisData, ErrorData, FaultInjectData, ProfilingData, RecoveryData, ScenarioData, ScenarioStatusData, SensorData

public abstract class DxcData
extends Object

The root of the Dxc data definition hierarchy.


Constructor Summary
DxcData()
          Construct with current time as timestamp
DxcData(long timestamp)
          Constructor
 
Method Summary
 boolean equals(Object obj)
           
static long getCurrentTime()
          Static method to obtain current time.
 String getSource()
          Get message source
 long getTimeStamp()
          Get message timestamp
 int hashCode()
           
abstract  OutputStream put(OutputStream out)
          Prints DxcData.
 void setSource(String source)
          Set source for DxcData Although this field can be freely manipulated by users in local instances of DxcData, they serve only for informative purposes.
 void setTimeStamp(long timestamp)
          Set timestamp for DxcData Although timestamps can be freely manipulated by users in local instances of DxcData, they serve only for informative purposes.
 String toString()
          Returns String representation of DxcData.
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DxcData

public DxcData()
Construct with current time as timestamp


DxcData

public DxcData(long timestamp)
Constructor

Parameters:
timestamp - - the desired timestamp in milliseconds since 1970-1-1 00:00:00 GMT
Method Detail

getTimeStamp

public long getTimeStamp()
Get message timestamp

Returns:
The message timestamp in milliseconds since 1970-1-1 00:00:00 GMT

setTimeStamp

public void setTimeStamp(long timestamp)
Set timestamp for DxcData Although timestamps can be freely manipulated by users in local instances of DxcData, they serve only for informative purposes. There is no guarantee that a DxcData message recipient won't overwrite the timestamp with the time of message arrival.

Parameters:
timestamp - - The desired timestamp in milliseconds since 1970-1-1 00:00:00 GMT

getSource

public String getSource()
Get message source

Returns:
Source of message

setSource

public void setSource(String source)
Set source for DxcData Although this field can be freely manipulated by users in local instances of DxcData, they serve only for informative purposes. There is no guarantee that a DxcData message source won't be overwritten after it's sent.

Parameters:
source - - source of message

put

public abstract OutputStream put(OutputStream out)
Prints DxcData.


toString

public String toString()
Returns String representation of DxcData.

Overrides:
toString in class Object

getCurrentTime

public static long getCurrentTime()
Static method to obtain current time.

Returns:
The current time in milliseconds since 1970-1-1 00:00:00 GMT

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object