MessagingService

MessagingService

# new MessagingService()

This class contains properties and methods required for Messaging Service.

Methods

# (async) addCacheNotificationListener(key, listener, eventType, eventDataFilter) → {Promise.<CacheEventDescriptor>}

Registers cache notification against a key EventType of type item added, updated or removed against specified keys in cache.

Parameters:
Name Type Description
key string

Unique key/keys to identify the cache item.

listener CacheDataModificationListener

class object for callback method

eventType Array.<EventType>

indicates eventtype on which callback method will be called

eventDataFilter EventDataFilter

indicates type of data that will be recieved

Returns:
Type
Promise.<CacheEventDescriptor>

# (async) createTopic(topicName, topicPriority) → {Promise.<Topic>}

Creates and retrieves the topic instance against the specified topic name.

Parameters:
Name Type Default Description
topicName string

topic name that will be used to create new topic

topicPriority TopicPriority null

priority options set for newly created topic

Returns:

The topic instance.

Type
Promise.<Topic>

# (async) deleteTopic(topicName)

Deletes the topic instance against the specified topic name.

Parameters:
Name Type Description
topicName string

topic name that will be used to delete topic

# (async) getTopic(topicName, searchOptions) → {Promise.<Topic>}

Retrieves the topic instance against the TopicSearchOptions and provided name or pattern.

Parameters:
Name Type Default Description
topicName string

topic name that will be used to get topic instance

searchOptions TopicSearchOptions null

additional search options

Returns:

Returns the topic instance, null if it does not exist.

Type
Promise.<Topic>

# (async) registerCQ(query)

Parameters:
Name Type Description
query ContinuousQuery

sql like query againts which continuous query will be registered

# (async) removeCacheNotificationListener(keys, listener, EventType)

Unregisters cache notification against specified keys in cache. async removeCacheNotificationListener(keys, listener, EventType) {

Parameters:
Name Type Description
keys Array.<string>

keys on which cache notification will be removed

listener CacheDataModificationListener

class object for call back method

EventType EventType

indicates eventtype on which callback method will be called

# (async) unRegisterCQ(query)

Unregisters an already registered continuous query to deactivate it on the cache server. Like RegisterCQ, it takes as argument an object of ContinuousQuery to unregister the callbacks which are no more fired after this call This method is used when the user is no more interested in receiving notifications for changes in a query result set.

Parameters:
Name Type Description
query ContinuousQuery

sql like query againts which continuous query will be unregistered