Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.utils
Interface ChangeHub

All Known Implementing Classes:
  IndexedChangeHub

    public interface ChangeHub

Interface implemented by ChangeHubs, i.e. classes that handle behaviour for multiple instances of Changeable classes.

Listeners are indexed with a key and when an event is fired, only listeners with the same key are invoked. The class manages the mapping between key and listener. It is the users responsibility to compute the key.

Since:
  1.3
Author:
  Thomas Down (original implementation), David Huen (refactoring)

Method Summary
`void` | `addListener(Object key, ChangeListener listener, ChangeType ct)` add a ChangeListener associated with given key.
`void` | `firePostChange(Object key, ChangeEvent cev)` invoke the firePostChangeEvent on all ChangeListeners associated with a specific key.
`void` | `firePreChange(Object key, ChangeEvent cev)` invoke the firePreChangeEvent on all ChangeListeners associated with a specific key.
`void` | `removeListener(Object key, ChangeListener listener, ChangeType ct)` remove a ChangeListener associated with given key.

Method Detail

### addListener

    void addListener(Object key,
                     ChangeListener listener,
                     ChangeType ct)

  add a ChangeListener associated with given key.

### removeListener

    void removeListener(Object key,
                        ChangeListener listener,
                        ChangeType ct)

  remove a ChangeListener associated with given key.

### firePreChange

    void firePreChange(Object key,
                       ChangeEvent cev)
                       throws ChangeVetoException

  invoke the firePreChangeEvent on all ChangeListeners associated with a specific key.

  Throws:
    `ChangeVetoException`

### firePostChange

    void firePostChange(Object key,
                        ChangeEvent cev)

  invoke the firePostChangeEvent on all ChangeListeners associated with a specific key.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD