Adds a new Matcher / Mailet pair
to the processor. Checks to ensure that the matcher and
mailet passed in are not null. Synchronized to ensure that
the matchers and mailets are kept in sync.
It is an essential part of the contract of the LinearProcessor
that a particular matcher/mailet combination be used to
terminate the processor chain. This is done by calling the
closeProcessorList method.
Once the closeProcessorList has been called any subsequent
call to the add method will result in an IllegalStateException.
This method is synchronized to protect against corruption of
matcher/mailets lists
Parameters: matcher - the new matcher being added Parameters: mailet - the new mailet being added throws: IllegalArgumentException - when the matcher or mailet passed in is null throws: IllegalStateException - when this method is called after the processor lists have been closed |