org.gcube.data.tmf.api
Interface SourceNotifier

All Superinterfaces:
Serializable

public interface SourceNotifier
extends Serializable

Manages subscriptions for and notifications of SourceEvents.

The service provides implementations of this interface and sets them on Sources, and subscribes with them. Plugins may then use them to fire events that the service should become aware of.

While the service is the primary subscriber to notifications of source events, plugin components may also acts as subscribers for increased decoupling from event producers.

Author:
Fabio Simeoni
See Also:
SourceEvent, Source.notifier()

Method Summary
 void notify(SourceEvent topic)
          Notifies subscribers of a SourceEvent event.
 void subscribe(SourceConsumer consumer, SourceEvent... events)
          Subscribes a SourceConsumer to one or more SourceEvents.
 

Method Detail

subscribe

void subscribe(SourceConsumer consumer,
               SourceEvent... events)
Subscribes a SourceConsumer to one or more SourceEvents.

Parameters:
consumer - the consumer
events - the events

notify

void notify(SourceEvent topic)
Notifies subscribers of a SourceEvent event.

Parameters:
topic - the topic


Copyright © 2012. All Rights Reserved.