/* JFox, the OpenSource J2EE Application Server
 *
 * Copyright (C) 2002 huihoo.com
 * Distributable under GNU LGPL license
 * See the GNU Lesser General Public License for more details.
 */

package org.jfox.ejb.plugin;

import java.util.Iterator;

import org.jfox.ejb.Invocation;
import org.jfox.ejb.Bulk;

/**
 * 执行器插件用来建立调用链,执行器用来执行具体的方法
 * 
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public interface Invoker {
  /**
   * 执行 invokeHome 方法
   * @param invocation
   * @param iter Invoker 调用链
   * @return
   * @throws Exception
   */
  Object invokeHome(final Bulk bulk, final Invocation invocation, final Iterator iter) throws Exception;

  /**
   * 执行 invokeBean 方法
   * @param invocation
   * @param iter Invoker 调用链
   * @return
   * @throws Exception
   */
  Object invokeBean(final Bulk bulk, final Invocation invocation, final Iterator iter) throws Exception;

}