Holger's
Java API

com.antelmann.util
Class HandlerList<T,E extends Exception>

java.lang.Object
  extended by 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

Constructor Summary
HandlerList()
           
HandlerList(List<Handler<? super T,? extends E>> list)
           
 
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
 

Constructor Detail

HandlerList

public HandlerList()

HandlerList

public HandlerList(List<Handler<? super T,? extends E>> list)
Method Detail

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-back
item - 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