View Javadoc

1   /*
2      Copyright 2008 Ramon Servadei
3   
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7   
8          http://www.apache.org/licenses/LICENSE-2.0
9   
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15   */
16  package fulmine.model.container.subscription.remote;
17  
18  /**
19   * An object that tracks remote subscriptions on itself.
20   * 
21   * @author Ramon Servadei
22   * 
23   */
24  public interface IRemoteSubscribable
25  {
26  
27      /**
28       * Mark this for remote subscription. This increments a subscription
29       * counter.
30       * 
31       * @return the number of subscriptions for this after the marking operation
32       *         completes
33       */
34      int markForRemoteSubscription();
35  
36      /**
37       * Unmark this from remote subscriptions. This decrements a subscription
38       * counter.
39       * 
40       * @return the number of subscriptions for this after the unmarking
41       *         operation completes
42       */
43      int unmarkForRemoteSubscription();
44  
45      /**
46       * Get the number of remote subscriptions this.
47       * 
48       * @return the number of remote subscriptions for this
49       */
50      int getRemoteSubscriptionCount();
51  }