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

com.jpattern.core.chain.AChainElementBlocking Maven / Gradle / Ivy

There is a newer version: 3.6.2
Show newest version
package com.jpattern.core.chain;

/**
 * 
 * @author Francesco Cina'
 *
 * 28/gen/2011
 * 
 * This is an element of a Chain of responsibility.
 * The method execute() is called only if the verifyCondition() returns true.
 * This element is not activated if a previous element of the same chain has been executed.
 */
public abstract class AChainElementBlocking extends AChainElement {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	protected AChainElementBlocking(IChainElement previousChainElement) {
		super(previousChainElement);
	}
	
	public final boolean tryExecution(IChainResult previousElementResult) {
		return !previousElementResult.isExecuted();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy