* @param handler
* @throws PhaseException
*/
public void addHandler(HandlerDescription handler) throws PhaseException {
if (isonehanlder) {
throw new PhaseException(
this.getPhaseName()
+ "can only have one handler, since there is a "
+ "handler with both phaseFirst and PhaseLast true ");
} else {
if (handler.getRules().isPhaseFirst() &&
handler.getRules().isPhaseLast()) {
if (handlers.size() > 0) {
throw new PhaseException(
this.getPhaseName()
+ " can not have more than one handler "
+ handler.getName()
+ " is invalid or incorrect phase rules");
} else {