com.antelmann.util
Class HandlerList<T,E extends Exception>
java.lang.Object
com.antelmann.util.HandlerList<T,E>
- All Implemented Interfaces:
- Handler<T,E>
public class HandlerList<T,E extends Exception>
- extends Object
- implements Handler<T,E>
allows to combine different handlers.
- Since:
- 07.10.2013, 17:41:15
- Author:
- holger
|
Method Summary |
void |
add(Handler<? super T,? extends E> handler)
|
List<Handler<? super T,? extends E>> |
getAll()
returns a newly generated list not backed by the embedded list |
void |
handle(Object callbackSource,
T item)
called by an object (for example some parser) when an item is observed that
ought to be handled by this implementation |
boolean |
remove(Handler<? super T,? extends E> handler)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HandlerList
public HandlerList()
HandlerList
public HandlerList(List<Handler<? super T,? extends E>> list)
add
public void add(Handler<? super T,? extends E> handler)
remove
public boolean remove(Handler<? super T,? extends E> handler)
getAll
public List<Handler<? super T,? extends E>> getAll()
- returns a newly generated list not backed by the embedded list
handle
public void handle(Object callbackSource,
T item)
throws E extends Exception
- Description copied from interface:
Handler
- called by an object (for example some parser) when an item is observed that
ought to be handled by this implementation
- Specified by:
handle in interface Handler<T,E extends Exception>
- Parameters:
callbackSource - the object that initiated this call-backitem - the item to be handled by this instance
- Throws:
E extends Exception
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads