|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Hub
A server-side hub that can publish data across reverse ajax and sync with a number of other hubs, including: JMS, the OpenAjax Alliance hub, and potentially others.
| Method Summary | |
|---|---|
void |
publish(java.lang.String topicName,
java.lang.Object message)
Publish some data to a certain topic. |
void |
subscribe(java.lang.String topicName,
MessageListener listener)
Called to create a subscription so that future publishes to a similarly named topic alert the MessageListener that a publish has happened. |
boolean |
unsubscribe(java.lang.String topicName,
MessageListener listener)
Reverse the action of subscribe(String, MessageListener) |
| Method Detail |
|---|
void subscribe(java.lang.String topicName,
MessageListener listener)
Warning Currently the topic is a simple string pattern match. This more closely resembles JMS rather than the OpenAjax hub because we're taking the simplistic approach for now. I'm sure there will be some nasty problems that fall out of this.
The OpenAjax hub allows subscriber data that is passed back to the subscriber when the event happens. Since listeners are an ideal place for this data it isn't supported here. The OAA hub also allows for filters, but I'm thinking that this can be easily supported by the listener. What am I missing?
topicName - The topic to subscribe to.listener - The object to notify of matching calls to publish()
boolean unsubscribe(java.lang.String topicName,
MessageListener listener)
subscribe(String, MessageListener)
topicName - The topic to subscribe to.listener - The object to notify of matching calls to publish()
void publish(java.lang.String topicName,
java.lang.Object message)
topicName - The topic to subscribe to.message - The data to publish
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||