01: package org.directwebremoting.event;
02:
03: import java.util.EventListener;
04:
05: import org.directwebremoting.proxy.openajax.PubSubHub;
06:
07: /**
08: * In order to propogate publish messages to another hub, some sort of filter
09: * is required to prevent a publish storm. A {@link SubscriptionListener} enables
10: * hubs to get notifications of what they need to propogate.
11: * @author Joe Walker [joe at getahead dot ltd dot uk]
12: */
13: public interface SubscriptionListener extends EventListener {
14: /**
15: * Someone has subscribed a {@link PublishListener} to a {@link PubSubHub}
16: * @param ev The subscription event
17: */
18: public void subscribeHappened(SubscriptionEvent ev);
19:
20: /**
21: * Someone has unsubscribed a {@link PublishListener} from a {@link PubSubHub}
22: * @param ev The subscription event
23: */
24: public void unsubscribeHappened(SubscriptionEvent ev);
25: }
|