/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */

package org.jfox.ejb.handler;

import java.util.Iterator;

import org.jfox.ejb.Bucket;
import org.jfox.ejb.Invocation;
import org.jfox.framework.logger.Logger;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public abstract class AbstractHandler implements Handler, Comparable {
    protected Logger logger = Logger.getLogger(getClass().getName());

    public AbstractHandler() {

    }

    public Object invokeHome(Bucket bucket, Invocation invocation, Iterator iter) throws Exception {
        return HandlerChain.nextInvokeHome(bucket, invocation, iter);
    }

    public Object invokeBean(Bucket bucket, Invocation invocation, Iterator iter) throws Exception {
        return HandlerChain.nextInvokeBean(bucket, invocation, iter);
    }

    public int compareTo(Object o) {
        return this.getClass().getName().compareTo(o.getClass().getName());
    }
}
