com.googlecode.jpattern.core.chain
Class AChainElement

java.lang.Object
  extended by com.googlecode.jpattern.core.chain.AChainElement
All Implemented Interfaces:
IChainElement, java.io.Serializable
Direct Known Subclasses:
AChainElementBlocking, AChainElementUnblocking

public abstract class AChainElement
extends java.lang.Object
implements IChainElement

Author:
Francesco Cina' 29/gen/2011
See Also:
Serialized Form

Constructor Summary
AChainElement(IChainElement previousChainElement)
           
 
Method Summary
 IChainResult exec()
          Execute the chain
abstract  void execute()
           
protected  IChainElement getPreviousChainElement()
           
abstract  boolean tryExecution(IChainResult previousElementResult)
           
abstract  boolean verifyCondition()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AChainElement

public AChainElement(IChainElement previousChainElement)
Method Detail

getPreviousChainElement

protected IChainElement getPreviousChainElement()

exec

public final IChainResult exec()
                        throws java.lang.Exception
Description copied from interface: IChainElement
Execute the chain

Specified by:
exec in interface IChainElement
Returns:
true if one the element did the job; false means that there isn't an element which can be activated at the current condition
Throws:
java.lang.Exception

verifyCondition

public abstract boolean verifyCondition()

execute

public abstract void execute()

tryExecution

public abstract boolean tryExecution(IChainResult previousElementResult)


Copyright © 2011. All Rights Reserved.