Class Index | File Index

Classes


Class Event.AbstractDataEvent

Represents an abstract event
Defined in: </home/ubuntu/streamscape/NeeveBuild/stjsapi/src/main/webapp/js/event/AbstractDataEvent.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new event
Method Summary
Method Attributes Method Name and Description
Object 
Returns data used for creation of an event acknowlegement.
String 
Returns a string version of the corelation identifier.
boolean 
Returns the flag indicating the durability of this event.
String 
Returns the optional field that allows developers to group this event with others of a similar type or within a sequence.
String 
Returns the Event Identifier for this datagram.
String 
Returns an optional field that uniquely identifies this event type instance.
Object 
Returns the value of the event property with the specified name.
String 
Returns the event source address of this event.
String 
Returns the Event Identifier that an event consumer may use to forward a (shallow) cloned instance of this event.
String 
Returns the Event Identifier that an event consumer may use to send a reply or acknowledgement on.
String 
Returns the security assertion token of the event.
number 
Returns the timestamp indicating when this object was created (coalesced) by the dispatcher.
boolean 
Returns true if this data object has protected elements.
void 
protect(principal, credential, acl)
Protects the payload portion of the object using the supplied principal and credential.
void 
Sets the event replyTo identifier to null.
void 
Sets the optional correlation identifier.
void 
setDurable(durable)
Sets the EventGram's durability flag.
void 
Sets the optional field that allows developers to group this event with others of a similar type or within a sequence.
void 
Sets an optional field that uniquely identifies this event type instance.
void 
setEventProperty(name, value)
Sets the value of the event property with the specified name.
void 
setForwardTo(eventId)
Sets the Event Identifier that an event consumer may use to forward a (shallow) cloned instance of this event.
void 
setReplyTo(eventId)
Sets the Event Identifier that an event consumer may use to send a reply or acknowledgement on.
void 
Sets the specified security assertion token.
void 
unprotect(principal, credential)
Unprotects the data element(s) that are made inaccessible by the #protect method.
Class Detail
Event.AbstractDataEvent(eventId)
Creates a new event
Parameters:
{String} eventId
The id of the event to be created
Method Detail
{Object} getAcknowledgementData()
Returns data used for creation of an event acknowlegement.
Returns:
The data used in an acknowlegement event or null if the event is not acknowledged

{String} getCorrelationId()
Returns a string version of the corelation identifier. Correlations may be used to match events to their related instances. For example events that are generated in pairs, such as those that participate in request/reply operations may need to set a request id that is then returned by the processing component allowing users to match requests with replies.
Returns:
The event correlation identifier

{boolean} getDurable()
Returns the flag indicating the durability of this event. Durable events are cached by local dispatchers if the dispatcher defines an event cache for a given event Id.
Returns:
The event durability flag

{String} getEventGroupId()
Returns the optional field that allows developers to group this event with others of a similar type or within a sequence.
Returns:
The event group identifier

{String} getEventId()
Returns the Event Identifier for this datagram. Event identifiers are special strings that utilize the dotted namespace format in order to specify the subject name that may be used to transmit the event object within the Service Event Fabric. Unlike the conventional messaging system wherein a transmission channel is decoupled from the object being transmitted, Event Datagrams are coupled to their transmission channels (Subjects). In this way the Event Identifier serves two functions. It specifies the transmission channel and hints at the signature of the object being transmitted.

Event Identifiers use the dotted notation to separate the namespace nodes. Special characters: `,~,!,@,#,$,%,^,&,*,(,),+,=,<,>,?,/,\,[,],{,},; are not permitted and their use will result in exception.

Returns:
The event identifier

{String} getEventKey()
Returns an optional field that uniquely identifies this event type instance. This may be used to hold a sequence id within a group or similar information.
Returns:
The event key

{Object} getEventProperty(name)
Returns the value of the event property with the specified name.
Parameters:
name
Returns:
The value of the event property

{String} getEventSource()
Returns the event source address of this event. An event source address represents a Fabric Address of the component where the message has originated. A datagram is stamped with an address when the coalesce method is called.
Returns:
The event source

{String} getForwardTo()
Returns the Event Identifier that an event consumer may use to forward a (shallow) cloned instance of this event.
Returns:
The forwardTo event identifier

{String} getReplyTo()
Returns the Event Identifier that an event consumer may use to send a reply or acknowledgement on.
Returns:
The replyTo event parameter

{String} getSecurityAssertionToken()
Returns the security assertion token of the event.
Returns:
The event security assertion token

{number} getTimestamp()
Returns the timestamp indicating when this object was created (coalesced) by the dispatcher. This value typically does not change for the life time of the datagram. The value is returned in milliseconds (since January 1, 1970, 00:00:00 GMT).
Returns:
The event timestamp

{boolean} isProtected()
Returns true if this data object has protected elements.
Returns:
true if the event is protected, false otherwise.

protect(principal, credential, acl)
Protects the payload portion of the object using the supplied principal and credential. This mechanism allows users or factory classes to mark the payload with basic security attributes: Read Permissions ReadAccess Write Permissions WriteAccess Retransmit Permissions TransmitAccess Security permissions are hierarchical. A re-transmit permission implies that any consumer has the ability to re-publish the event to an exchange even though they may not be able to access the event's contents. Note that an Event Id is not the same as an Exchange Destination. While destinations are used as physical units for routing network traffic, event id's are used as logical units that identify the type of payload.

Read access implies that a consumer other then the security principal can read the contents of the payload but may not modify the actual object. Write permissions imply that a consumer other then the security principal can read and write the object, but may not re-transmit it, for instance as part of a routing mechanism.

If no permissions are set on the object it is expected that consumers other then the principal cannot read or write the content. However in all cases Event Identity Management and similar properties can still be accessed

Parameters:
{String} principal
The principal to be set
{String} credential
The credential to be set
{String} acl
The permissions to be set

resetReplyTo()
Sets the event replyTo identifier to null.

setCorrelationId(id)
Sets the optional correlation identifier.
Parameters:
{String} id
The event correlation identifier to be set

setDurable(durable)
Sets the EventGram's durability flag. Durable events are cached by local dispatchers if the dispatcher defines an event cache for a given event Id. The cache buffer acts as a Most Recent Event cache of a particular depth. When a consumer for a durable cache is added to the dispatcher it first receives the most recently cached events before joining the event stream.
Parameters:
{boolean} durable
the durability flag to be set

setEventGroupId(id)
Sets the optional field that allows developers to group this event with others of a similar type or within a sequence.
Parameters:
{String} id
The event group identifier to be set

setEventKey(key)
Sets an optional field that uniquely identifies this event type instance.
Parameters:
{String} key
The event key to be set

setEventProperty(name, value)
Sets the value of the event property with the specified name.
Parameters:
{String} name
The event property name
{String} value
The value of the event property to be set

setForwardTo(eventId)
Sets the Event Identifier that an event consumer may use to forward a (shallow) cloned instance of this event. The Exchange and other client factories may use this field to re-transmit the event datagram. This setting may be changed by the user after the event has been raised. However, if the datagram is protected and the getTransmitAccess() method does not return a status that allows the event to be re-transmitted this method will throw an exception.

Although the actual use of this method is left up to the user, a forwarding Event Identifier is primarily intended to assist in the implementation of a Forward Chaining technique for event processing. This allows events to be easily composed into micro-flows by using the Acknowledge and Forward operation. Since the operation typically results in an acknowledgement event being raised every time the event is forwarded such an event chain provides built-in state reporting and change capture.

Note that forwarded events retain their original time stamp, source id and properties. However, depending on the implementation the payload may be changed.

Parameters:
{String} eventId
The forwardTo event identifier to be set

setReplyTo(eventId)
Sets the Event Identifier that an event consumer may use to send a reply or acknowledgement on. The Exchange and other client factories may use this field to create acknowledgements or reply messages. This setting may not be changed after the event is raised.
Parameters:
{String} eventId
The replyTo identifier to be set

setSecurityAssertionToken(token)
Sets the specified security assertion token.
Parameters:
{String} token
The event security assertion token to be set

unprotect(principal, credential)
Unprotects the data element(s) that are made inaccessible by the #protect method. The principal and credentials must match.
Parameters:
{String} principal
The principal to be checked
{String} credential
The credential to be checked

Copyright © 2015-2021 StreamScape Technologies. All rights reserved.