Package org.apache.commons.chain.impl
Class NonDelegatingCommand
java.lang.Object
org.apache.commons.chain.impl.NonDelegatingCommand
- Direct Known Subclasses:
AddingCommand,DelegatingCommand,DispatchLookupCommandTestCase.TestCommand,ExceptionCommand,NonDelegatingFilter
Implementation of
Command that simply logs its identifier
and returns.- Version:
- $Revision$ $Date$
- Author:
- Craig R. McClanahan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe identifier to log for this Command instanceFields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE -
Constructor Summary
ConstructorsConstructorDescriptionConstruct an instance that will log the specified identifier -
Method Summary
-
Field Details
-
id
The identifier to log for this Command instance
-
-
Constructor Details
-
NonDelegatingCommand
public NonDelegatingCommand() -
NonDelegatingCommand
Construct an instance that will log the specified identifier- Parameters:
id- identifier to log for this Command instance
-
-
Method Details
-
setId
-
execute
Execution method for this Command- Specified by:
executein interfaceCommand<Context>- Parameters:
context- TheContextto be processed by thisCommand- Returns:
trueif the processing of thisContexthas been completed, orfalseif the processing of thisContextshould be delegated to a subsequentCommandin an enclosingChain- Throws:
Exception- general purpose exception return to indicate abnormal terminationIllegalArgumentException- ifcontextisnull
-
log
Log the specifiedidinto a StringBuffer attribute named "log" in the specifiedcontext, creating it if necessary.- Parameters:
context- TheContextinto which we log the identifiersid- The identifier to be logged
-