com.ibm.ftt.resources.core
Class ResourcePublisher

java.lang.Object
  extended by com.ibm.ftt.resources.core.ResourcePublisher
All Implemented Interfaces:
IResourcePublisher

public class ResourcePublisher
extends Object
implements IResourcePublisher

The default implementation of the IResourcePublisher.


Field Summary
static String COPY_RIGHT
           
 
Constructor Summary
ResourcePublisher()
           
 
Method Summary
 List getSubscriptions()
          Returns a list of all subscriptions attached to this resource publisher.
 void publish(IResourceSubscriptionEvent event)
          Notifies all subscribers that an event pertaining to this publisher occurred.
 void subscribe(IResourceSubscription subscription)
          Attaches a new subscription to this resource publisher.
 void unsubscribe(Object subscriber)
          Detaches the subscription associated with the subscriber from this publisher.
 

Field Detail

COPY_RIGHT

public static final String COPY_RIGHT
See Also:
Constant Field Values
Constructor Detail

ResourcePublisher

public ResourcePublisher()
Method Detail

subscribe

public void subscribe(IResourceSubscription subscription)
Description copied from interface: IResourcePublisher
Attaches a new subscription to this resource publisher. If a subscription already exists for the subscriber, the original subscription will be replaced.

Specified by:
subscribe in interface IResourcePublisher
Parameters:
subscription - the subscription to be added for this resource publisher

unsubscribe

public void unsubscribe(Object subscriber)
Description copied from interface: IResourcePublisher
Detaches the subscription associated with the subscriber from this publisher.

Specified by:
unsubscribe in interface IResourcePublisher
Parameters:
subscriber - the subscriber associated with the subscription to be detached from this resource publisher. If no subscription is associated with the specified subscriber, do nothing.

publish

public void publish(IResourceSubscriptionEvent event)
Description copied from interface: IResourcePublisher
Notifies all subscribers that an event pertaining to this publisher occurred. If this resource publisher contains one or more IResourceSubscription, IResourceSubscription.notifySubscriber(IResourceSubscriptionEvent) method is called for each subscription.

Specified by:
publish in interface IResourcePublisher
Parameters:
event - the event to publish to all the subscribers

getSubscriptions

public List getSubscriptions()
Description copied from interface: IResourcePublisher
Returns a list of all subscriptions attached to this resource publisher.

Specified by:
getSubscriptions in interface IResourcePublisher