|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tibco.bpm.web.client.model.pagebus.hub.ManagedObject
com.tibco.bpm.web.client.model.pagebus.hub.IframeHubClient
public class IframeHubClient
Wraps the TIBCO PageBus JavaScript IframeHubClient providing a JSNI interface enabling the use of Managed Hub events.
©2011 Cloud Software Group, Inc.
Constructor Summary | |
---|---|
IframeHubClient()
Creates an IframeHubClient with defaults values for optional parameters. |
|
IframeHubClient(HubPolicy hubPolicy,
OnSecurityAlertCallback onSecurityAlertCallback,
OnLogCallback onLogCallback)
Creates an IframeHubClient with the given optional parameters. |
Method Summary | |
---|---|
void |
connect(OnCompleteCallback onCompleteCallback)
Requests a connection to the ManagedHub, via the Container associated with this HubClient. |
void |
disconnect(OnCompleteCallback onCompleteCallback)
Disconnect from the ManagedHub Disconnect immediately: 1. |
java.lang.String |
getClientId()
Returns the client ID of this HubClient |
java.lang.Object |
getParameters()
|
java.lang.String |
getPartnerOrigin()
If DISCONNECTED: Returns null If CONNECTED: Returns the origin associated with the window containing the Container associated with this HubClient instance. |
java.lang.Object |
getScope()
|
SubscriberData |
getSubscriberData(Subscription subscription)
|
java.lang.Object |
getSubscriberScope()
|
boolean |
isConnected()
|
void |
publish(PageBusMessage message)
|
void |
publish(java.lang.String topic,
PageBusMessage message)
|
protected void |
publishNative(java.lang.String topic,
com.google.gwt.core.client.JavaScriptObject message)
|
PageBusMessage[] |
query(java.lang.String topic)
|
void |
store(java.lang.String topic,
PageBusMessage message)
|
Subscription |
subscribe(java.lang.String topic,
OnDataCallback onDataCallback,
OnSubscribeCompleteCallback onSubscribeCompleteCallback,
SubscriberData subscriberData)
|
protected Subscription |
subscribeNative(java.lang.String topic,
com.google.gwt.core.client.JavaScriptObject subscriberCallback,
com.google.gwt.core.client.JavaScriptObject onCompleteCallback,
com.google.gwt.core.client.JavaScriptObject subscriberData)
|
void |
unsubscribe(Subscription subscription,
OnSubscribeCompleteCallback onSubscribeCompleteCallback)
|
Methods inherited from class com.tibco.bpm.web.client.model.pagebus.hub.ManagedObject |
---|
addObject, getManagedObjectForNative |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IframeHubClient()
BadParametersException
public IframeHubClient(HubPolicy hubPolicy, OnSecurityAlertCallback onSecurityAlertCallback, OnLogCallback onLogCallback)
hubPolicy
- The HubPolicy instance used for security control of this IframeHubClient.onSecurityAlertCallback
- Invoked when a security alert is raised.onLogCallback
- Receives build-in logging from the PageBus.
BadParametersException
Method Detail |
---|
public void connect(OnCompleteCallback onCompleteCallback)
HubClient
If the Container accepts the connection request, the HubClient's state is set to CONNECTED and the HubClient invokes the onComplete callback function.
If the Container refuses the connection request, the HubClient invokes the onComplete callback function with an error code. The error code might, for example, indicate that the Container is being destroyed.
In most implementations, this function operates asynchronously, so the onComplete callback function is the only reliable way to determine when this function completes and whether it has succeeded or failed.
A component within a Container application may call HubClient.disconnect and then call HubClient.connect.
connect
in interface HubClient
onCompleteCallback
- Callback function to call when this operation completes.public java.lang.String getPartnerOrigin()
HubClient
If CONNECTED: Returns the origin associated with the window containing the Container associated with this HubClient instance. The origin has the format
[protocol]://[host]
where:
[protocol] is "http" or "https"
[host] is the hostname of the partner page.
getPartnerOrigin
in interface HubClient
public java.lang.String getClientId()
HubClient
getClientId
in interface HubClient
public void publish(PageBusMessage message)
publish
in interface Hub
public void publish(java.lang.String topic, PageBusMessage message)
publish
in interface Hub
protected void publishNative(java.lang.String topic, com.google.gwt.core.client.JavaScriptObject message)
public Subscription subscribe(java.lang.String topic, OnDataCallback onDataCallback, OnSubscribeCompleteCallback onSubscribeCompleteCallback, SubscriberData subscriberData)
subscribe
in interface Hub
protected Subscription subscribeNative(java.lang.String topic, com.google.gwt.core.client.JavaScriptObject subscriberCallback, com.google.gwt.core.client.JavaScriptObject onCompleteCallback, com.google.gwt.core.client.JavaScriptObject subscriberData)
public void disconnect(OnCompleteCallback onCompleteCallback)
HubClient
Disconnect immediately:
This function operates asynchronously, so the onComplete callback function is the only reliable way to determine when this function completes and whether it has succeeded or failed.
A client application is allowed to call HubClient.disconnect and then call HubClient.connect.
disconnect
in interface HubClient
onCompleteCallback
- Callback function to call when this operation completes.public void unsubscribe(Subscription subscription, OnSubscribeCompleteCallback onSubscribeCompleteCallback)
unsubscribe
in interface Hub
public boolean isConnected()
isConnected
in interface Hub
public java.lang.Object getScope()
getScope
in interface Hub
public SubscriberData getSubscriberData(Subscription subscription)
getSubscriberData
in interface Hub
public java.lang.Object getSubscriberScope()
getSubscriberScope
in interface Hub
public java.lang.Object getParameters()
getParameters
in interface Hub
public PageBusMessage[] query(java.lang.String topic)
EventCache.query(JavaScriptObject, String)
public void store(java.lang.String topic, PageBusMessage message)
EventCache.store(JavaScriptObject, String, PageBusMessage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |