public final class AcknowledgementEvent extends com.streamscape.sdo.event.AbstractMutableEvent implements EventDatagram
Title: Structured Data Objects: Acknowledgment Event
Description: A datagram that acknowledges delivery of an event datagram.
onAcknowledgeAction
- An enum
of type AcknowledgeAction
that specifies an optional action.recipientId
- An optional recipient identifier used to match multiple event acknowledgments.correlationEventExpiration
- An optional expiration time for the correlated event.correlationTimeStamp
- The Time Stamp of the source event that this acknowledges.correlationEventSource
- The Event Source identifier for the event that this acknowledges.correlationEventId
- The Event Id for the event that this acknowledges.Copyright: Copyright (c) 2011
Company: StreamScape Technologies
SEMANTIC_TYPE_NAME
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(java.lang.String propertyName,
java.lang.String sdrPath)
Annotates (exports the value) of a specified data field in the class denoted by the
Semantic Type . |
boolean |
equals(java.lang.Object other) |
AcknowledgeAction |
getAction()
Returns the acknowledgement action.
|
long |
getCorrelationEventExpiration()
Returns the expiration period of the event acknowledged by this event.
|
java.lang.String |
getCorrelationEventId()
Returns the event id of the event acknowledged by this event.
|
byte[] |
getCorrelationEventSource()
Returns a copy of the event source of the event acknowledged by this event.
|
java.util.Date |
getCorrelationEventTimeStamp()
Returns a timestamp of the event acknowledged by this event.
|
java.lang.Object |
getData()
Returns a copy of acknowledgement data of this event.
|
java.lang.String |
getDataType()
Returns a semantic type of the data object of this event.
|
java.lang.String |
getRecipientID()
Returns the recipient id of this acknowledgement event.
|
void |
setAction(AcknowledgeAction action)
Sets acknowledgement action.
|
void |
setCorrelationEventExpiration(long expiration)
Sets the specified expiration as an expiration period of the event acknowledged by this event.
|
void |
setCorrelationEventId(java.lang.String eventId)
Sets the specified event id as an event id of the event acknowledged by this event.
|
void |
setCorrelationEventTimeStamp(java.util.Date ts)
Sets the specified timestamp as a timestamp of the event acknowledged by this event.
|
void |
setData(java.lang.Object data)
Sets acknowledgement data.
|
void |
setRecipientID(java.lang.String recipient)
Sets the recipient id for this acknowledgement event.
|
clearEventProperties, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
canConvertEventProperty, clone, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getDurable, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventGroupId, getEventId, getEventIntProperty, getEventKey, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventSource, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTimestamp, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, hasSuitableAnnotationType, isProtected
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canConvertEventProperty, clearEventProperties, existsEventProperty, getAnnotatedProperties, getAnnotation, getCorrelationId, getCorrelationIdAsBytes, getEventBigDecimalProperty, getEventBooleanProperty, getEventByteProperty, getEventDoubleProperty, getEventExpiration, getEventFloatProperty, getEventIntProperty, getEventLongProperty, getEventObjectProperty, getEventPropertyNames, getEventPropertyType, getEventShortProperty, getEventStringProperty, getForwardTo, getPermissions, getReadAccess, getReplyTo, getSecurityAssertionToken, getSecurityAssertionTokenAsBytes, getTransmitAccess, getWriteAccess, hasAnnotatedProperties, isProtected, protect, removeAnnotation, removeEventProperty, resetReplyTo, setCorrelationId, setCorrelationIdAsBytes, setDurable, setEventBigDecimalProperty, setEventBigDecimalProperty, setEventBooleanProperty, setEventByteProperty, setEventDoubleProperty, setEventExpiration, setEventFloatProperty, setEventGroupId, setEventIntProperty, setEventKey, setEventLongProperty, setEventObjectProperty, setEventShortProperty, setEventStringProperty, setFinal, setForwardTo, setReplyTo, setSecurityAssertionToken, setSecurityAssertionTokenAsBytes, unprotect
clone, getDurable, getEventGroupId, getEventId, getEventKey, getEventSource, getTimestamp
getSerialVersionUID
public void setData(java.lang.Object data) throws SecurityViolationException
data
- the acknowledgement data to be set.SDORuntimeException
- if the event is coalesced (locked for editing).SecurityViolationException
- if the event is protected from write access.public java.lang.Object getData() throws SecurityViolationException, SDOException
SecurityViolationException
- if the event is protected from read access.SDOException
- if some internal error occurs.public java.lang.String getDataType() throws SecurityViolationException, SDOException
null
if the data object is null
or it has no semantic type associated with one.SecurityViolationException
- if the event is protected from read access.SDOException
- if some internal error occurs.public void setCorrelationEventTimeStamp(java.util.Date ts) throws SecurityViolationException
ts
- the timestamp to be set as a timestamp of the event acknowledged by this event.SecurityViolationException
- if the event is protected from write access.public java.util.Date getCorrelationEventTimeStamp() throws SecurityViolationException
SecurityViolationException
- if the event is protected from write access.public byte[] getCorrelationEventSource() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setCorrelationEventId(java.lang.String eventId) throws SecurityViolationException
eventId
- a value to be set as an event id of the event acknowledged by this eventSecurityViolationException
- if the event is protected from write access.public java.lang.String getCorrelationEventId() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setCorrelationEventExpiration(long expiration) throws SecurityViolationException
expiration
- a value to be set as an expiration period of the event acknowledged by this event.SecurityViolationException
- if the event is protected from write access.public long getCorrelationEventExpiration() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void setAction(AcknowledgeAction action) throws SecurityViolationException
action
- the acknowledgement action to be set.SecurityViolationException
- if the event is protected from write access.public AcknowledgeAction getAction() throws SecurityViolationException, SDOException
SecurityViolationException
- if the event is protected from read access.SDOException
public void setRecipientID(java.lang.String recipient) throws SecurityViolationException
recipient
- the recipient id to be set for this acknowledgement event.SecurityViolationException
- if the event is protected from write access.public java.lang.String getRecipientID() throws SecurityViolationException
SecurityViolationException
- if the event is protected from read access.public void addAnnotation(java.lang.String propertyName, java.lang.String sdrPath) throws SecurityViolationException, SDOException
EventDatagram
Semantic Type
. In EventGram parlance an annotated datagram is an object
that contains additional information in it's header that refers (or is a subset of) the
datagram's payload. It is expected that the payload object referenced by Semantic Type
is part of the object's data structure prior to invocation of this method.
Annotated properties are populated with values derived from field elements of the data class.
The event source factory uses Java reflection to inspect the class and extract the specified
field elements prior to transmitting the event. This allows EventGrams to produce
secured content and still route and filter the datagrams by annotated content. The annotated
classes must be part of the Structured Data Object
definition.
If this event datagram has been created from a prototype (by method DatagramFactory.createEvent(String)
),
adding of new properties is not allowed. An exception will be thrown if the specified property does not exist.
Adding of new properties is allowed for uninitialized event datagram intended for a prototype creation
(such datagram can be created by methods like DatagramFactory.newEventInstance(String)
or
DatagramFactory.newEventInstanceFrom(String)
).
Event models supporting annotations are the following:
AuditEvent
//data
or //severity
.DataEvent
//data
or //data/<data_fields>
.
DeltaEvent
//beforeImage
or //beforeImage/<image_fields>
or
//afterImage
or //afterImage/<image_fields>
.
ExceptionEvent
//errorMessage
or //errorCode
or //severity
.
MapEvent
//map[<index>]
or //map[key='<key>']
or
//map[value='<value>']
.
String
value and
so the type of annotated property will always be String
.
RowArrayEvent
//row[<primary_key_value>]/<column_name>
or
//row[<primary_key_value>]/column[<column_index>]
.
<primary_key_value>;
is the value of the primary key column in the desired
row for annotation.
RowChangeEvent
//rowBefore/<column_name>
or //rowBefore/column[<column_index>]
or //rowAfter/<column_name>
or //rowAfter/column[<column_index>]
.
RowEvent
//row/<column_name>
or //row/column[<column_index>]
.
RowSetEvent
//row[<row_index>]/<column_name>
or
//row[<row_index>]/column[<column_index>]
.
StreamStateEvent
//streamState
or //stateMessage
or //streamPosition
.
TextEvent
//data/text
.
XMLEvent
<test attr="val"> <inside>Test1</inside> <inside>Test2</inside> </test>An annotation with path
//test/inside[2]
makes an event property with String
value equal to Test2
.
//test
makes an event property with String
value equal to
<inside>Test1</inside><inside>Test2</inside>
.
XMPPEvent
//body
.
addAnnotation
in interface EventDatagram
addAnnotation
in class com.streamscape.sdo.event.AbstractMutableEvent
propertyName
- the name of the property to be added.sdrPath
- the path to the data field to be annotated.SecurityViolationException
- if the event is write-protected.SDOException
- if the event does not support annotation or
if the specified property does not exist and this event has been created from a prototype or
if some internal error occurs.public boolean equals(java.lang.Object other)
equals
in class com.streamscape.sdo.IAbstractDataEvent
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.