Package jadex.commons.future
Class TerminationCommand
- java.lang.Object
- 
- jadex.commons.future.TerminationCommand
 
- 
- All Implemented Interfaces:
- ITerminationCommand
 
 public abstract class TerminationCommand extends java.lang.Object implements ITerminationCommand Base implementation of termination command to be used for sub-classing.
- 
- 
Constructor SummaryConstructors Constructor Description TerminationCommand()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancheckTermination(java.lang.Exception reason)Check if termination is allowed.abstract voidterminated(java.lang.Exception reason)Called after termination was performed.
 
- 
- 
- 
Method Detail- 
checkTerminationpublic boolean checkTermination(java.lang.Exception reason) Check if termination is allowed. Called before termination is performed. Note that due to race conditions, the future may already be finished when this method executes. If false is returned, the termination request is ignored.- Specified by:
- checkTerminationin interface- ITerminationCommand
- Parameters:
- reason- The reason supplied for termination.
- Returns:
- True, if termination should proceed.
 
 - 
terminatedpublic abstract void terminated(java.lang.Exception reason) Called after termination was performed. Guaranteed to be called only once for each future and only if the termination finished the future (i.e. is not called when the future was already finished).- Specified by:
- terminatedin interface- ITerminationCommand
- Parameters:
- reason- The reason supplied for termination.
 
 
- 
 
-