private void handleAdd(String methodName, Object arg) { if ("addConfirmListener".equals(methodName)) confirmListeners.add((ConfirmListener) arg); else if ("addFlowListener".equals(methodName)) flowListeners.add((FlowListener) arg); else if ("addReturnListener".equals(methodName)) returnListeners.add((ReturnListener) arg); }
private void handleRemove(String methodName, Object arg) { if ("removeConfirmListener".equals(methodName)) confirmListeners.remove((ConfirmListener) arg); else if ("removeFlowListener".equals(methodName)) flowListeners.remove((FlowListener) arg); else if ("removeReturnListener".equals(methodName)) returnListeners.remove((ReturnListener) arg); }
/** * Add a {@link FlowListener}. * @param listener the listener to add */ void addFlowListener(FlowListener listener);
/** * Remove a {@link FlowListener}. * @param listener the listener to remove * @return <code><b>true</b></code> if the listener was found and removed, * <code><b>false</b></code> otherwise */ boolean removeFlowListener(FlowListener listener);