1 /*
2 * Copyright (c) 2005, The K-Wf Grid Consortium
3 * Fraunhofer Institute for Computer Architecture and Software Technology
4 * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
5 */
6 package net.kwfgrid.gwes.uiproxy;
7
8 /**
9 Interface for a subscription handler. This allows to use the UIProxy for different event systems.
10 */
11 public interface SubscriptionHandler {
12 /**
13 Handle a subscription request.
14 If this method returns normally the subscription must have been successful.
15 @param subscriber The consumer.
16 @param subscription The specification of the generic subscription.
17 @return The subscription ID needed to cancel the subscription.
18 @exception SubscriptionFailed If the subscription could not be made.
19 */
20 String subscribe(Consumer subscriber, String subscription) throws SubscriptionFailed;
21 /**
22 Cancel a subscription.
23 @param subscriptionid The ID of the subscription to cancel.
24 */
25 void cancel(String subscriptionid);
26
27 }