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
Modifier and TypeFieldDescriptionprotected String
The identifier to log for this Command instanceFields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
ConstructorDescriptionConstruct 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:
execute
in interfaceCommand<Context>
- Parameters:
context
- TheContext
to be processed by thisCommand
- Returns:
true
if the processing of thisContext
has been completed, orfalse
if the processing of thisContext
should be delegated to a subsequentCommand
in an enclosingChain
- Throws:
Exception
- general purpose exception return to indicate abnormal terminationIllegalArgumentException
- ifcontext
isnull
-
log
Log the specifiedid
into a StringBuffer attribute named "log" in the specifiedcontext
, creating it if necessary.- Parameters:
context
- TheContext
into which we log the identifiersid
- The identifier to be logged
-