|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tibco.bpm.web.client.model.pagebus.hub.ManagedEventService com.tibco.bpm.web.client.model.pagebus.hub.ManagedEventHub
public abstract class ManagedEventHub
Encapsulates the details of creating a ManagedHubFrame and adding subscribers, events, and handlers.
©2014 Cloud Software Group, Inc.
Field Summary |
---|
Fields inherited from class com.tibco.bpm.web.client.model.pagebus.hub.ManagedEventService |
---|
onSubscribeCompleteCallback, subscriptions |
Constructor Summary | |
---|---|
protected |
ManagedEventHub(java.lang.String hubPolicyXml)
Creates a ManagedEventHub using a default serviceId set to: "ManagedEventHub" |
protected |
ManagedEventHub(java.lang.String serviceId,
java.lang.String hubPolicyXml)
Creates a ManagedEventHub. |
Method Summary | |
---|---|
Subscription |
addSubscriber(java.lang.String topic,
OnDataCallback onDataCallback,
OnSubscribeCompleteCallback onSubscribeCompleteCallback,
SubscriberData subscriberData)
Creates a subscription to a topic name. |
Subscription |
addSubscriberNative(java.lang.String topic,
com.google.gwt.core.client.JavaScriptObject onDataCallback,
com.google.gwt.core.client.JavaScriptObject onSubscribeCompleteCallback,
com.google.gwt.core.client.JavaScriptObject subscriberData)
Creates a subscription to a topic name using native JSO arguments. |
void |
applyHubPolicy(java.lang.String hubPolicyXml)
The given hubPolicyXml is used to grant/revoke permissions on the HubPolicy. |
ManagedHubFrame |
createManagedHubFrame(java.lang.String iFrameUri,
java.lang.Integer timeout)
|
static void |
log(java.lang.String msg)
|
void |
policyGrant(java.lang.String uri,
HubPolicy.Operation opType,
java.lang.String topic)
|
void |
policyRevoke(java.lang.String uri,
HubPolicy.Operation opType,
java.lang.String topic)
|
void |
publish(PageBusMessage message)
Publishes the given message. |
void |
publish(java.lang.String topic,
PageBusMessage message)
Publishes the given message using the given topic. |
void |
removeSubscriber(Subscription subscription)
Removes the given subscription. |
void |
removeSubscribers()
Removes subscriptions previously added and clears the subscriptions set. |
Methods inherited from class com.tibco.bpm.web.client.model.pagebus.hub.ManagedEventService |
---|
addEvent, addEvents, addHandler, addHandlers, addSubscribers, alertMessage, getServiceId, onRemoveSubscriberComplete, removeEvents, removeHandlers, setServiceId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ManagedEventHub(java.lang.String hubPolicyXml)
ManagedEventHub(String, String)
protected ManagedEventHub(java.lang.String serviceId, java.lang.String hubPolicyXml)
serviceId
- May be used in alert messages or logs to identify the service instance.hubPolicyXml
- The XML used to define the HubPolicy.Method Detail |
---|
public Subscription addSubscriber(java.lang.String topic, OnDataCallback onDataCallback, OnSubscribeCompleteCallback onSubscribeCompleteCallback, SubscriberData subscriberData)
ManagedEventService
ManagedEventService.removeSubscribers()
is called.
If the subscription's topic name contains wildcards, then the subscriber
will be notified via its onDataCallback if the wildcard topic associated
with the subscription matches the topic of the published event, even if
the two topics are not identical. For example, if a subscriber
subscribes to "a.b.*", then it will be notified when someone publishes on
the topic "a.b.c" or the topic "a.b.x".
The value of the subscriberData parameter determines whether the
subscriber is cache-enabled.
addSubscriber
in class ManagedEventService
topic
- Topic name on which to subscribe. This MAY be a wildcard
topic.onDataCallback
- Callback function for ManagedEventService to invoke
when a message is published on the subscribed
subject.
This parameter must NOT be null.onSubscribeCompleteCallback
- Callback function for ManagedEventService
to invoke after the subscription has been added.
Optional, null value is permitted.subscriberData
- User-defined. Null value is permitted. This is
useful when the subscriber needs to access or
update any data members when the callback function
is invoked. The value of the subscriberData
parameter determines whether the subscriber is
cache-enabled.
ManagedEventService.removeSubscriber(Subscription)
public Subscription addSubscriberNative(java.lang.String topic, com.google.gwt.core.client.JavaScriptObject onDataCallback, com.google.gwt.core.client.JavaScriptObject onSubscribeCompleteCallback, com.google.gwt.core.client.JavaScriptObject subscriberData)
ManagedEventService
addSubscriberNative
in class ManagedEventService
ManagedEventService.addSubscriber(String, OnDataCallback, OnSubscribeCompleteCallback, SubscriberData)
public void removeSubscribers()
ManagedEventService
ManagedEventService.onRemoveSubscriberComplete(Subscription, boolean, String)
method is called for each callback when the unsubscribe action is
complete.
removeSubscribers
in class ManagedEventService
ManagedEventService.addSubscribers()
,
ManagedEventService.onRemoveSubscriberComplete(Subscription, boolean, String)
public void removeSubscriber(Subscription subscription)
ManagedEventService
ManagedEventService.onRemoveSubscriberComplete(Subscription, boolean, String)
method is called for each callback when the unsubscribe action is
complete.
removeSubscriber
in class ManagedEventService
public void applyHubPolicy(java.lang.String hubPolicyXml)
hubPolicyXml
- The XML used to define the HubPolicy.public ManagedHubFrame createManagedHubFrame(java.lang.String iFrameUri, java.lang.Integer timeout)
public void policyGrant(java.lang.String uri, HubPolicy.Operation opType, java.lang.String topic)
HubPolicy#grant(String, Operation, String)}
public void policyRevoke(java.lang.String uri, HubPolicy.Operation opType, java.lang.String topic)
HubPolicy#revoke(String, Operation, String)}
public void publish(PageBusMessage message)
ManagedEventService
publish
in class ManagedEventService
message
- Message to be published on the given topic.public void publish(java.lang.String topic, PageBusMessage message)
ManagedEventService
publish
in class ManagedEventService
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.public static void log(java.lang.String msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |