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

net.anotheria.anosite.action.ActionWrapper Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
package net.anotheria.anosite.action;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
 * Action wrapper class.
 * Contains Moskito-Producer for selected action, and action itself.
 *
 * @author h3ll
 */
public class ActionWrapper implements Action {

	/**
	 * ActionWrapper action.
	 */
	private Action action;

	/**
	 * ActionWrapper producer.
	 */
	private ActionProducer producer;

	/**
	 * Constructor.
	 *
	 * @param action   {@link Action}
	 * @param producer {@link ActionProducer}
	 */
	public ActionWrapper(Action action, ActionProducer producer) {
		this.action = action;
		this.producer = producer;
	}

	@Override
	public ActionCommand execute(HttpServletRequest req, HttpServletResponse resp, ActionMapping mapping) throws Exception {
		return producer.execute(req, resp, mapping, action);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy