de.dante.extex.interpreter.context.observer.count
Interface CountObservable

All Known Implementing Classes:
ContextImpl

public interface CountObservable

This interface describes the possibility to register an observer for an expansion event.

Version:
$Revision: 1.3 $
Author:
Gerd Neugebauer

Method Summary
 void registerCountObserver(java.lang.String name, CountObserver observer)
          Register an observer for count change events.
 void unregisterCountObserver(java.lang.String name, CountObserver observer)
          Remove a registered observer for count change events.
 

Method Detail

registerCountObserver

public void registerCountObserver(java.lang.String name,
                                  CountObserver observer)
Register an observer for count change events. Count change events are triggered when a value is assigned to a count register. In this case the appropriate method in the observer is invoked.

A single count register can be observed by giving a name of the count register to observe. Only changes to this register trigger the notification. If this name is null the changes to all registers are reported to the observer.

Parameters:
name - the name or the number of the register
observer - the observer to receive the events

unregisterCountObserver

public void unregisterCountObserver(java.lang.String name,
                                    CountObserver observer)
Remove a registered observer for count change events. Count change events are triggered when a value is assigned to a count register. In this case the appropriate method in the observer is invoked.

A single count register can be observed by giving a name of the count register to observe. The de-registration removes all instances of the observer for this register. If none is registered then nothing happens.

If this name is null then the observer for all registers is removed. Note that the observers for named registers are not effected. They have to be unregistered individually.

Parameters:
name - the name or the number of the register
observer - the observer to receive the events