org.apache.commons.chain.impl
Class NonDelegatingCommand

java.lang.Object
  extended by org.apache.commons.chain.impl.NonDelegatingCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AddingCommand, DelegatingCommand, ExceptionCommand, NonDelegatingFilter

public class NonDelegatingCommand
extends Object
implements Command

Implementation of Command that simply logs its identifier and returns.

Version:
$Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
Author:
Craig R. McClanahan

Field Summary
protected  String id
           
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
NonDelegatingCommand()
           
NonDelegatingCommand(String id)
           
 
Method Summary
 boolean execute(Context context)
           
protected  void log(Context context, String id)
          Log the specified id into a StringBuffer attribute named "log" in the specified context, creating it if necessary.
 void setId(String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id
Constructor Detail

NonDelegatingCommand

public NonDelegatingCommand()

NonDelegatingCommand

public NonDelegatingCommand(String id)
Method Detail

setId

public void setId(String id)

execute

public boolean execute(Context context)
                throws Exception
Specified by:
execute in interface Command
Throws:
Exception

log

protected void log(Context context,
                   String id)

Log the specified id into a StringBuffer attribute named "log" in the specified context, creating it if necessary.

Parameters:
context - The Context into which we log the identifiers
id - The identifier to be logged


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.