|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.sensorevent.model.generic.GenericEvent
com.ibm.sensorevent.model.IBMSensorEvent
public class IBMSensorEvent
IBMSensorEvent represents the event type processed by Data Capture and
Premises Server within the IBM sensor event model. Each IBMSensorEvent has
an IHeader
, an
IPayloadMetaData
, and an
IPayload
.
The interface associated with this class is ISensorEvent
.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
protected IHeader |
header
The event's header |
protected IPayload |
payload
The event's payload |
protected IPayloadMetaData |
payloadMetaData
The event's payload metadata |
protected java.lang.String |
version
The event's version |
Fields inherited from class com.ibm.sensorevent.model.generic.GenericEvent |
---|
groups, name |
Constructor Summary | |
---|---|
protected |
IBMSensorEvent()
Constructs a new IBMSensorEvent |
protected |
IBMSensorEvent(IPayload payload)
Constructs a new IBMSensorEvent with the specified IPayload |
Method Summary | |
---|---|
static ISensorEvent |
getAggregatedTagReadInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with a PassiveRFIDAggregatedTagReadPayload
payload |
static ISensorEvent |
getAlertDebugInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an AlertDebugPayload |
static ISensorEvent |
getAlertErrorInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an AlertErrorPayload |
static ISensorEvent |
getAlertInfoInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an AlertInfoPayload |
static ISensorEvent |
getAlertWarningInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an AlertWarningPayload |
static ISensorEvent |
getApplicationPingInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an ApplicationPingPayload |
static ISensorEvent |
getApplicationPongInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an ApplicationPongPayload |
IHeader |
getHeader()
Returns the event's header |
static ISensorEvent |
getHeartbeatInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an HeartbeatPayload |
static ISensorEvent |
getIBMSensorEventInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an IBMSensorEventPayload |
static ISensorEvent |
getInstance()
Factory method to create an ISensorEvent with a default payload |
static ISensorEvent |
getInstance(java.lang.String eventType,
IPayload payload)
Factory method to create an ISensorEvent with the specified event type and IPayload |
static ISensorEvent |
getInstance(java.lang.String eventType,
java.util.Map payloadMap)
Factory method to create an ISensorEvent with the specified event type and IBMSensorEventPayload . |
IPayload |
getPayload()
Returns the event's payload. |
IPayloadMetaData |
getPayloadMetaData()
Returns the event's payload metadata |
static ISensorEvent |
getPortalCommandInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an PortalCommandPayload |
static ISensorEvent |
getPortalReportInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an PortalReportPayload |
static ISensorEvent |
getReloadInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an ReloadPayload |
static ISensorEvent |
getRestartInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an RestartPayload |
static ISensorEvent |
getTagReadFeedbackInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an TagReadFeedbackPayload |
static ISensorEvent |
getTagReadInstance(java.lang.String eventType)
Factory method to create an ISensorEvent with the specified event type and with an PassiveRFIDTagReadPayload |
static ISensorEvent |
getTypedInstance(java.lang.String eventType,
java.util.Map payloadMap)
Factory method to create an ISensorEvent with the specified event type and IBMSensorEventPayload . |
java.lang.String |
getVersion()
Returns the event's version |
void |
setHeader(IHeader header)
Sets the event's header |
void |
setPayload(IPayload payload)
Sets the event's payload |
void |
setPayloadMetaData(IPayloadMetaData payloadMetaData)
Sets the event's payload metadata |
void |
setVersion(java.lang.String v)
Sets the event's version |
java.util.Map |
toMap()
Converts the event to a java.util.Map |
java.lang.String |
toString()
Returns a string representation of the event (for debug purposes) |
void |
updateEventType(java.lang.String newEventType)
Updates the header's eventType and the payload's eventGroup name to the given new eventType. |
Methods inherited from class com.ibm.sensorevent.model.generic.GenericEvent |
---|
addGroup, getGroup, getGroups, getInstance, getName, removeGroups, 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.generic.IGenericEvent |
---|
addGroup, getGroup, getGroups, getName, removeGroups, setGroups, setName, traverseGroupPath |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected volatile java.lang.String version
protected volatile IHeader header
protected volatile IPayloadMetaData payloadMetaData
protected volatile IPayload payload
Constructor Detail |
---|
protected IBMSensorEvent() throws SensorEventException
SensorEventException
protected IBMSensorEvent(IPayload payload) throws SensorEventException
IPayload
payload
- the payload to save in the event
SensorEventException
Method Detail |
---|
public static ISensorEvent getInstance() throws SensorEventException
SensorEventException
public static ISensorEvent getInstance(java.lang.String eventType, IPayload payload) throws SensorEventException
IPayload
eventType
- the event typepayload
- the payload
SensorEventException
public static ISensorEvent getInstance(java.lang.String eventType, java.util.Map payloadMap) throws SensorEventException
IBMSensorEventPayload
. The payload is
created from a map of strings.
eventType
- the event typepayloadMap
- the map containing payload data (all keys/values must be of type String)
SensorEventException
public static ISensorEvent getTypedInstance(java.lang.String eventType, java.util.Map payloadMap) throws SensorEventException
IBMSensorEventPayload
. The payload is
created from a map of objects.
eventType
- the event typepayloadMap
- the map containing payload data (values may be of any type)
SensorEventException
public static ISensorEvent getAggregatedTagReadInstance(java.lang.String eventType) throws SensorEventException
PassiveRFIDAggregatedTagReadPayload
payload
eventType
-
SensorEventException
public static ISensorEvent getAlertDebugInstance(java.lang.String eventType) throws SensorEventException
AlertDebugPayload
eventType
-
SensorEventException
public static ISensorEvent getAlertInfoInstance(java.lang.String eventType) throws SensorEventException
AlertInfoPayload
eventType
-
SensorEventException
public static ISensorEvent getAlertWarningInstance(java.lang.String eventType) throws SensorEventException
AlertWarningPayload
eventType
-
SensorEventException
public static ISensorEvent getAlertErrorInstance(java.lang.String eventType) throws SensorEventException
AlertErrorPayload
eventType
-
SensorEventException
public static ISensorEvent getApplicationPingInstance(java.lang.String eventType) throws SensorEventException
ApplicationPingPayload
eventType
-
SensorEventException
public static ISensorEvent getApplicationPongInstance(java.lang.String eventType) throws SensorEventException
ApplicationPongPayload
eventType
-
SensorEventException
public static ISensorEvent getHeartbeatInstance(java.lang.String eventType) throws SensorEventException
HeartbeatPayload
eventType
-
SensorEventException
public static ISensorEvent getPortalCommandInstance(java.lang.String eventType) throws SensorEventException
PortalCommandPayload
eventType
-
SensorEventException
public static ISensorEvent getPortalReportInstance(java.lang.String eventType) throws SensorEventException
PortalReportPayload
eventType
-
SensorEventException
public static ISensorEvent getReloadInstance(java.lang.String eventType) throws SensorEventException
ReloadPayload
eventType
-
SensorEventException
public static ISensorEvent getRestartInstance(java.lang.String eventType) throws SensorEventException
RestartPayload
eventType
-
SensorEventException
public static ISensorEvent getTagReadFeedbackInstance(java.lang.String eventType) throws SensorEventException
TagReadFeedbackPayload
eventType
-
SensorEventException
public static ISensorEvent getTagReadInstance(java.lang.String eventType) throws SensorEventException
PassiveRFIDTagReadPayload
eventType
-
SensorEventException
public static ISensorEvent getIBMSensorEventInstance(java.lang.String eventType) throws SensorEventException
IBMSensorEventPayload
eventType
-
SensorEventException
public java.lang.String getVersion() throws SensorEventException
getVersion
in interface ISensorEvent
SensorEventException
public void setVersion(java.lang.String v) throws SensorEventException
setVersion
in interface ISensorEvent
SensorEventException
public IHeader getHeader() throws SensorEventException
getHeader
in interface ISensorEvent
SensorEventException
public void setHeader(IHeader header) throws SensorEventException
setHeader
in interface ISensorEvent
SensorEventException
public IPayloadMetaData getPayloadMetaData() throws SensorEventException
getPayloadMetaData
in interface ISensorEvent
SensorEventException
public void setPayloadMetaData(IPayloadMetaData payloadMetaData) throws SensorEventException
setPayloadMetaData
in interface ISensorEvent
SensorEventException
public IPayload getPayload() throws SensorEventException
IPayload
.
If the payload class name cannot be loaded, the type returned is
IPayload
.
getPayload
in interface ISensorEvent
SensorEventException
public void setPayload(IPayload payload) throws SensorEventException
setPayload
in interface ISensorEvent
SensorEventException
public java.util.Map toMap() throws SensorEventException
toMap
in interface ISensorEvent
SensorEventException
public void updateEventType(java.lang.String newEventType) throws SensorEventException
IBMSensorEventPayload
.
updateEventType
in interface ISensorEvent
newEventType
- the new eventType name
SensorEventException
public java.lang.String toString()
toString
in class GenericEvent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |