org.terracotta.toolkit.events
Interface ToolkitNotifier<T>

All Superinterfaces:
Destroyable, ToolkitObject

public interface ToolkitNotifier<T>
extends Destroyable, ToolkitObject

A notifier that can be used to send notifications across the cluster.

Consult the Toolkit class level docs for more info on behavior regarding destroy.


Method Summary
 void addNotificationListener(ToolkitNotificationListener<T> listener)
          Add a local notification listener.
 List<ToolkitNotificationListener<T>> getNotificationListeners()
          Returns the List of the local NotificationListeners.
 void notifyListeners(T msg)
          Send the msg to all the listeners in the cluster
The local listeners wont be notified
 void removeNotificationListener(ToolkitNotificationListener<T> listener)
          Remove the notification listener.
 
Methods inherited from interface org.terracotta.toolkit.object.Destroyable
destroy, isDestroyed
 
Methods inherited from interface org.terracotta.toolkit.object.ToolkitObject
getName
 

Method Detail

addNotificationListener

void addNotificationListener(ToolkitNotificationListener<T> listener)
Add a local notification listener. Will be notified for remote changes.


removeNotificationListener

void removeNotificationListener(ToolkitNotificationListener<T> listener)
Remove the notification listener.


notifyListeners

void notifyListeners(T msg)
Send the msg to all the listeners in the cluster
The local listeners wont be notified


getNotificationListeners

List<ToolkitNotificationListener<T>> getNotificationListeners()
Returns the List of the local NotificationListeners. The returned list is not mutable.

Returns:
list of listeners


Copyright © 2014 Terracotta, Inc.. All Rights Reserved.