|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sag.osami.api.context.ContextEvent
public final class ContextEvent
Instances of the ContextEvent class represent a single context event and its constituents, since a context is a container for the context data + context management data (ID, timestamp, origin, type, origin context store).
Date
object which allows a resolution of milliseconds
IContextStore.getStoreID()
)
Constructor Summary | |
---|---|
ContextEvent(java.lang.Long id,
java.lang.Object data,
java.lang.String originID,
java.util.Date timestamp,
java.lang.String type,
java.lang.String contextStoreOriginID)
Constructor (mainly) for internal use, using the parameters as the values for the context event. |
|
ContextEvent(java.lang.Object data,
java.lang.String originID,
java.util.Date timestamp,
java.lang.String type)
Constructor (mainly) for public use, taking the parameters as the values for the context event, but null as ID and
contextStoreOriginID (both determined internally by context store) |
Method Summary | |
---|---|
java.lang.String |
getContextStoreOriginID()
Gets the origin ContextStore of the context, i.e. the (unique) name of the ContextStore where the context was created originally. |
java.lang.Object |
getData()
Gets the payload data of the context. |
java.lang.Long |
getID()
Gets the numeric, unique ID of the context. |
java.lang.String |
getOriginID()
Gets the origin of the context. |
java.util.Date |
getTimestamp()
Gets the time of creation of the context. |
java.lang.String |
getType()
Gets the type of the context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextEvent(java.lang.Object data, java.lang.String originID, java.util.Date timestamp, java.lang.String type)
null
as ID
and
contextStoreOriginID
(both determined internally by context store)
data
- payload data of the context event, may be nulloriginID
- origin ID of the context eventtimestamp
- creation date of the context eventtype
- type of the context eventpublic ContextEvent(java.lang.Long id, java.lang.Object data, java.lang.String originID, java.util.Date timestamp, java.lang.String type, java.lang.String contextStoreOriginID)
id
- unique numeric ID of the context eventdata
- payload data of the context event, may be nulloriginID
- origin ID of the context eventtimestamp
- creation date of the context eventtype
- type of the context eventcontextStoreOriginID
- name of the context store where the context event was originally createdMethod Detail |
---|
public java.lang.Long getID()
public java.lang.String getType()
Example: "TEMP_C"
(for temperature in Celsius)
public java.lang.Object getData()
public java.lang.String getOriginID()
Example: "COM/SAG/OSAMI/SENSORS/VITAL"
for some sensor system
public java.util.Date getTimestamp()
public java.lang.String getContextStoreOriginID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |