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

org.openbp.server.handler.Handler Maven / Gradle / Ivy

There is a newer version: 0.9.11
Show newest version
/*
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
package org.openbp.server.handler;

import org.openbp.core.CoreConstants;

/**
 * Generic handler.
 * This class defines a hook for any kind of custom code, e. g. activity or event handlers.
 *
 * @author Heiko Erhardt
 */
public interface Handler
	extends CoreConstants
{
	/**
	 * Executes the handler.
	 * Implement this method to execute the business logic of the activity.
	 *
	 * @param hc Handler context that contains execution parameters
	 * @return true if the handler handled the event, false to apply the default handling to the event
	 * @throws Exception Any exception that may occur during execution of the handler will be
	 * propagated to an exception handler if defined or abort the process execution otherwise.
	 */
	public boolean execute(HandlerContext hc)
		throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy