1package org.apache.velocity.app.event;
23/*4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License. 20 */2122/**23 * Strategy object used to execute event handler method. Will be called24 * while looping through all the chained event handler implementations.25 * Each EventHandler method call should have a parallel executor object26 * defined. 27 *28 * @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>29 * @version $Id: EventHandlerMethodExecutor.java 685685 2008-08-13 21:43:27Z nbubna $30 * @since 1.531 */32publicinterfaceEventHandlerMethodExecutor33 {
34/**35 * Execute the event handler method. If Object is not null, do not 36 * iterate further through the handler chain.37 * If appropriate, the returned Object will be the return value.38 * 39 * @param handler call the appropriate method on this handler40 * @exception Exception generic exception potentially thrown by event handlers41 */42publicvoid execute(EventHandler handler) throws Exception;
4344/**45 * Called after execute() to see if iterating should stop. Should46 * always return false before method execute() is run.47 * 48 * @return true if no more event handlers for this method should be called.49 */50publicboolean isDone();
5152/**53 * Get return value at end of all the iterations54 * 55 * @return null if no return value is required56 */57public Object getReturnValue();
58 }