All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.weixinmp.http.dialog.base.support.OperationAdapter Maven / Gradle / Ivy

package net.sf.weixinmp.http.dialog.base.support;

import java.util.Map;

import net.sf.weixinmp.http.dialog.base.support.htmlunit.UnExpectedOperationException;

import org.apache.log4j.Logger;

public class OperationAdapter implements Operation {
	protected Map referenceCnotext;
	private final static Logger LOGGER = Logger.getLogger(OperationAdapter.class);

	public void run() {
		try {
			execute();
		} catch (Exception e) {
			LOGGER.warn("Operation Exception: ", e);
			if (!isContinueWhenError()) {
				throw new UnExpectedOperationException(e);
			}
		}
	}

	protected void execute() throws Exception {
		// TODO 
	}

	public void setContext(final Map context) {
		this.referenceCnotext = context;
	}

	public boolean isContinueWhenError() {
		return true;
	}

	public E getResult() {
		return null;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy