|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openfin.desktop.InterApplicationBus
public class InterApplicationBus
A messaging bus that allows for pub / sub messaging between different applications. Available via getInterApplicationBus() method on DesktopConnection
| Constructor Summary | |
|---|---|
InterApplicationBus(DesktopConnection desktopConnection)
Constructor |
|
| Method Summary | |
|---|---|
void |
addSubscribeListener(SubscriptionListener listener)
Registers a listener which is called whenever a subscription occurs. |
void |
publish(String topic,
Object message)
Publishes a message to a topic |
void |
publish(String topic,
Object message,
AckListener callback)
Publishes a message to a topic |
void |
removeSubscribeListener(SubscriptionListener listener)
Removes the passed listener. |
void |
send(String destinationUuid,
String topic,
Object message)
Sends a message to an application |
void |
send(String destinationUuid,
String topic,
Object message,
AckListener listener)
Sends a message to an application |
void |
subscribe(String sourceUuid,
String topic,
BusListener listener)
Subscribes to messages on the specified topic |
void |
subscribe(String sourceUuid,
String topic,
BusListener listener,
AckListener callback)
Subscribes to messages on the specified topic |
void |
unsubscribe(String sourceUuid,
String topic,
BusListener listener)
Unsubscribes to messages on the specified topic |
void |
unsubscribe(String sourceUuid,
String topic,
BusListener listener,
AckListener callback)
Unsubscribes to messages on the specified topic |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InterApplicationBus(DesktopConnection desktopConnection)
desktopConnection - Connection object to the AppDesktop| Method Detail |
|---|
public void publish(String topic,
Object message)
throws DesktopIOException,
DesktopException
topic - Topic to which the message is publishedmessage - The JSON message to publish *
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void publish(String topic,
Object message,
AckListener callback)
throws DesktopIOException,
DesktopException
topic - Topic to which the message is publishedmessage - The JSON message to publish *callback - AckListener for the request
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void send(String destinationUuid,
String topic,
Object message)
throws DesktopIOException,
DesktopException
destinationUuid - UUID of the application from which messages are senttopic - Topic to which the message is publishedmessage - The JSON message to publish
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void send(String destinationUuid,
String topic,
Object message,
AckListener listener)
throws DesktopIOException,
DesktopException
destinationUuid - UUID of the application from which messages are senttopic - Topic to which the message is publishedmessage - The JSON message to publishlistener - AckListener for the message
DesktopIOException
DesktopExceptionDesktopIOException,
DesktopException
public void subscribe(String sourceUuid,
String topic,
BusListener listener)
throws DesktopIOException,
DesktopException
sourceUuid - The UUID of the application to which to subscribe. The wildcard "*" can be used to receive messages from all applicationstopic - The topic to be subscribed tolistener - BusListener for the subscription
DesktopIOException
DesktopExceptionBusListener,
DesktopIOException,
DesktopException
public void subscribe(String sourceUuid,
String topic,
BusListener listener,
AckListener callback)
throws DesktopIOException,
DesktopException
sourceUuid - The UUID of the application to which to subscribe. The wildcard "*" can be used to receive messages from all applicationstopic - The topic to be subscribed tolistener - BusListener for the subscriptioncallback - AckListener for the message
DesktopIOException
DesktopExceptionBusListener,
AckListener,
DesktopIOException,
DesktopException
public void unsubscribe(String sourceUuid,
String topic,
BusListener listener)
throws DesktopIOException,
DesktopException
sourceUuid - UUID of the applicationtopic - The topic to be subscribed tolistener - BusListener for the subscription
DesktopIOException
DesktopExceptionBusListener,
DesktopIOException,
DesktopException
public void unsubscribe(String sourceUuid,
String topic,
BusListener listener,
AckListener callback)
throws DesktopIOException,
DesktopException
sourceUuid - UUID of the applicationtopic - The topic to be subscribed tolistener - BusListener for the subscriptioncallback - AckListener for the message
DesktopIOException
DesktopExceptionBusListener,
AckListener,
DesktopIOException,
DesktopExceptionpublic void addSubscribeListener(SubscriptionListener listener)
listener - Listener to addpublic void removeSubscribeListener(SubscriptionListener listener)
listener - Listener to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||