A more functional framework would pass explicit context * in to the execution, so that more interesting work could * be performed. For example, per-client session state will * often be preserved, and the path info for the request will * identify some particular object. */ public void execute () { // Default implementation: does nothing // Note that an explicit context (passed by argument) // is often desirable (e.g. security or transaction // context, parameters, etc) } } /** * Simple which, when executed, "uppercases" text (according * to the rules used in the server's locale). */ static public class Uppercase extends Executable { /** * This method's execution uppercases the content of its child * text element. */ public void execute () { // merge multiple text nodes ... and collapse space, unless // requested otherwise normalize (); Text child = (Text) getFirstChild (); if (child != null) child.setData (child.getData ().toUpperCase ()); } } }