com.tibco.bpm.web.client.model.pagebus.hub
Class EventCache
java.lang.Object
com.tibco.bpm.web.client.model.pagebus.hub.EventCache
public class EventCache
- extends java.lang.Object
Handles the JSNI interface to query and store methods which are common to the
Simple PageBus interface and ManagedHub and Hub client instances.
©2011 Cloud Software Group, Inc.
- Since:
- 1.2.0
Method Summary |
static PageBusMessage[] |
query(com.google.gwt.core.client.JavaScriptObject nativeObj,
java.lang.String topic)
Returns all event cache entries that match the specified topic name
(which might be a wildcard topic). |
static void |
store(com.google.gwt.core.client.JavaScriptObject nativeObj,
java.lang.String topic,
PageBusMessage message)
Calls PageBus.publish for cache-enabled topics to store the specified
value and notify subscribers of the change. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventCache
public EventCache()
query
public static PageBusMessage[] query(com.google.gwt.core.client.JavaScriptObject nativeObj,
java.lang.String topic)
- Returns all event cache entries that match the specified topic name
(which might be a wildcard topic).
The result of a non-wildcard query will contain 0-1 events, depending on
whether there is a value in the cache for that topic. A query on a
wildcard topic returns 0 or more events, one for each value in the cache
whose topic matches the wildcard specified in the query.
Can be safely called from within a PageBus callback.
- Parameters:
nativeObj
- Instance of native object implementing store function.topic
- The topic name to query. This MAY be a wildcard topic.
- Returns:
- An Array of PageBusMessage instances. The topic value is set
Each object has the form { topic: topic, value: value }.
- Throws:
BadParametersException
- An illegal topic was specified.
store
public static void store(com.google.gwt.core.client.JavaScriptObject nativeObj,
java.lang.String topic,
PageBusMessage message)
- Calls PageBus.publish for cache-enabled topics to store the specified
value and notify subscribers of the change. Otherwise, throws the
NoCacheException.
This function can be safely called from within PageBus callback functions.
- Parameters:
nativeObj
- Instance of native object implementing store function.topic
- Topic name on which to publish the message. This must NOT
be a wildcard topic.message
- Message to be published on the given topic.
- Throws:
BadParametersException
- An invalid topic was specified. A topic
may be invalid either because it is not a
legal topic name or because it is a
wildcard topic.
NoCacheException
- There is no cache for the specified topic.
Copyright © 2015 Cloud Software Group, Inc. All Rights Reserved.