com.ibm.sensorevent.model.payload
Class HeartbeatPayload

java.lang.Object
  extended by com.ibm.sensorevent.model.generic.GenericGroup
      extended by com.ibm.sensorevent.model.Group
          extended by com.ibm.sensorevent.model.Payload
              extended by com.ibm.sensorevent.model.payload.IBMSensorEventPayload
                  extended by com.ibm.sensorevent.model.payload.ReportPayload
                      extended by com.ibm.sensorevent.model.payload.HeartbeatPayload
All Implemented Interfaces:
IGenericGroup, IGroup, IPayload, ISensorEventPayload, java.io.Serializable

public class HeartbeatPayload
extends ReportPayload

HeartbeatPayload represents heartbeat events sent from Data Capture to Premises Server.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String SEPARATOR
           
static java.lang.String STATUS_DELIM
           
static java.lang.String STATUS_DOWN
           
static java.lang.String STATUS_UP
           
 
Fields inherited from class com.ibm.sensorevent.model.payload.ReportPayload
ATTR_VALUE
 
Fields inherited from class com.ibm.sensorevent.model.payload.IBMSensorEventPayload
ATTR_TAG_KEY_INOUT, ATTR_TAGLIST_KEY_INOUT, eventGroup
 
Fields inherited from class com.ibm.sensorevent.model.Payload
payloadClassName
 
Fields inherited from class com.ibm.sensorevent.model.generic.GenericGroup
attributes, groups, name
 
Constructor Summary
protected HeartbeatPayload(java.lang.String eventType)
          Constructs an HeartbeatPayload for the specified event type
 
Method Summary
static IGenericGroup fromMap(java.util.Map map, java.lang.String eventType)
          Creates an HeartbeatPayload from the specified java.util.Map and for the event type
 java.util.List getDownList()
          Return a list of IDs that have a status of 'DOWN'
static IGenericGroup getInstance()
          Factory method to create an HeartbeatPayload
static IGenericGroup getInstance(IPayload sourcePayload)
          Factory method to create an HeartbeatPayload from the specified payload
static IGenericGroup getInstance(java.lang.String eventType)
          Factory method to create an HeartbeatPayload for the specified event type
 java.util.List getUpList()
          Return a list of IDs that have a status of 'UP'
 boolean isDown(java.lang.String id)
          Return true if the ID has a status of 'DOWN'
 boolean isUp(java.lang.String id)
          Return true if the ID has a status of 'UP'
 
Methods inherited from class com.ibm.sensorevent.model.payload.ReportPayload
getValue, processMap, setValue, toMap, toTypedMap
 
Methods inherited from class com.ibm.sensorevent.model.payload.IBMSensorEventPayload
copyFields, fromMap, fromMap, fromTypedMap, fromTypedMap, fromTypedMap, getAllGenericTagIDs, getEventGroup, getGenericTagID, getGenericTagIDFromAttribute, getGenericTagIDs, getGenericTagIDsFromAttribute, getInstance, setEventGroup
 
Methods inherited from class com.ibm.sensorevent.model.Payload
copyFields, copyGroup, getPayloadClassName, setPayloadClassName, toString
 
Methods inherited from class com.ibm.sensorevent.model.Group
processGroup, processMap, processTypedGroup, processTypedMap
 
Methods inherited from class com.ibm.sensorevent.model.generic.GenericGroup
addAttribute, addAttributeArray, addBooleanArrayAttribute, addBooleanAttribute, addByteArrayAttribute, addByteAttribute, addDateArrayAttribute, addDateArrayAttributeAsLong, addDateAttribute, addDateAttributeAsLong, addDoubleArrayAttribute, addDoubleAttribute, addFloatArrayAttribute, addFloatAttribute, addGroup, addHexAttribute, addHexAttribute, addIntArrayAttribute, addIntAttribute, addLongArrayAttribute, addLongAttribute, addShortArrayAttribute, addShortAttribute, addStringArrayAttribute, addStringAttribute, createGroupPath, getAttribute, getAttributes, getAttributesAsList, getBooleanAttributeArrayValue, getBooleanAttributeValue, getByteAttributeArrayValue, getByteAttributeValue, getDateAttributeArrayValue, getDateAttributeArrayValueAsLong, getDateAttributeValue, getDateAttributeValueAsLong, getDoubleAttributeArrayValue, getDoubleAttributeValue, getFloatAttributeArrayValue, getFloatAttributeValue, getGroup, getGroups, getGroupsAsList, getHexAttributeValue, getHexAttributeValueAsString, getIntAttributeArrayValue, getIntAttributeValue, getLongAttributeArrayValue, getLongAttributeValue, getName, getShortAttributeArrayValue, getShortAttributeValue, getStringAttributeArrayValue, getStringAttributeValue, removeAttributes, removeGroups, setAttributes, setGroups, setName, traverseGroupPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.sensorevent.model.IPayload
copyFields, getPayloadClassName, setPayloadClassName
 
Methods inherited from interface com.ibm.sensorevent.model.generic.IGenericGroup
addAttribute, addAttributeArray, addBooleanArrayAttribute, addBooleanAttribute, addByteArrayAttribute, addByteAttribute, addDateArrayAttribute, addDateArrayAttributeAsLong, addDateAttribute, addDateAttributeAsLong, addDoubleArrayAttribute, addDoubleAttribute, addFloatArrayAttribute, addFloatAttribute, addGroup, addHexAttribute, addHexAttribute, addIntArrayAttribute, addIntAttribute, addLongArrayAttribute, addLongAttribute, addShortArrayAttribute, addShortAttribute, addStringArrayAttribute, addStringAttribute, createGroupPath, getAttribute, getAttributes, getAttributesAsList, getBooleanAttributeArrayValue, getBooleanAttributeValue, getByteAttributeArrayValue, getByteAttributeValue, getDateAttributeArrayValue, getDateAttributeArrayValueAsLong, getDateAttributeValue, getDateAttributeValueAsLong, getDoubleAttributeArrayValue, getDoubleAttributeValue, getFloatAttributeArrayValue, getFloatAttributeValue, getGroup, getGroups, getGroupsAsList, getHexAttributeValue, getHexAttributeValueAsString, getIntAttributeArrayValue, getIntAttributeValue, getLongAttributeArrayValue, getLongAttributeValue, getName, getShortAttributeArrayValue, getShortAttributeValue, getStringAttributeArrayValue, getStringAttributeValue, removeAttributes, removeGroups, setAttributes, setGroups, setName, traverseGroupPath
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

SEPARATOR

public static final java.lang.String SEPARATOR
See Also:
Constant Field Values

STATUS_DELIM

public static final java.lang.String STATUS_DELIM
See Also:
Constant Field Values

STATUS_DOWN

public static final java.lang.String STATUS_DOWN
See Also:
Constant Field Values

STATUS_UP

public static final java.lang.String STATUS_UP
See Also:
Constant Field Values
Constructor Detail

HeartbeatPayload

protected HeartbeatPayload(java.lang.String eventType)
                    throws SensorEventException
Constructs an HeartbeatPayload for the specified event type

Parameters:
eventType - the event type
Throws:
SensorEventException
Method Detail

getInstance

public static IGenericGroup getInstance()
                                 throws SensorEventException
Factory method to create an HeartbeatPayload

Throws:
SensorEventException

getInstance

public static IGenericGroup getInstance(java.lang.String eventType)
                                 throws SensorEventException
Factory method to create an HeartbeatPayload for the specified event type

Parameters:
eventType - the event type
Throws:
SensorEventException

getInstance

public static IGenericGroup getInstance(IPayload sourcePayload)
                                 throws SensorEventException
Factory method to create an HeartbeatPayload from the specified payload

Parameters:
sourcePayload - the payload to copy from
Throws:
SensorEventException

fromMap

public static IGenericGroup fromMap(java.util.Map map,
                                    java.lang.String eventType)
                             throws SensorEventException
Creates an HeartbeatPayload from the specified java.util.Map and for the event type

Parameters:
map - source java.util.Map
eventType - the event type
Throws:
SensorEventException

getUpList

public java.util.List getUpList()
                         throws SensorEventException
Return a list of IDs that have a status of 'UP'

Returns:
list of IDs
Throws:
SensorEventException

getDownList

public java.util.List getDownList()
                           throws SensorEventException
Return a list of IDs that have a status of 'DOWN'

Returns:
list of IDs
Throws:
SensorEventException

isUp

public boolean isUp(java.lang.String id)
             throws SensorEventException
Return true if the ID has a status of 'UP'

Parameters:
id -
Returns:
Throws:
SensorEventException

isDown

public boolean isDown(java.lang.String id)
               throws SensorEventException
Return true if the ID has a status of 'DOWN'

Parameters:
id -
Returns:
Throws:
SensorEventException


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.