org.bushe.swing.event
Interface EventTopicSubscriber<T>

All Known Subinterfaces:
PrioritizedEventTopicSubscriber
All Known Implementing Classes:
ProxyTopicPatternSubscriber, ProxyTopicSubscriber

public interface EventTopicSubscriber<T>

Callback interface for topic-based subscribers of an EventService.


Method Summary
 void onEvent(String topic, T data)
          Handle an event published on a topic.
 

Method Detail

onEvent

void onEvent(String topic,
             T data)
Handle an event published on a topic.

The EventService calls this method on each publication on a matching topic name passed to one of the EventService's topic-based subscribe methods, specifically, EventService.subscribe(String, EventTopicSubscriber) EventService.subscribe(java.util.regex.Pattern,EventTopicSubscriber) EventService.subscribeStrongly(String,EventTopicSubscriber) and EventService.subscribeStrongly(java.util.regex.Pattern, EventTopicSubscriber).

Parameters:
topic - the name of the topic published on
data - the data object published on the topic


Copyright © 2011 Bushe Enterprises, Inc.. All Rights Reserved.