org.apache.cocoon.components.flow.apples.samples
Class CalculationApple

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.flow.apples.samples.CalculationApple
All Implemented Interfaces:
LogEnabled, AppleController

public class CalculationApple
extends AbstractLogEnabled
implements AppleController

CalculationApple shows an easy Apple example implementation for a Calculator.

It is explicitely designed to show the difference with flowscript by remembering the 'lookahead' information from the previous path that entered already the other data.

In other words this shows that Apples are not building a complete tree of continuations like flowscript is doing. But the initial argument of course was that some cases simply don't need it.


Constructor Summary
CalculationApple()
           
 
Method Summary
 void process(AppleRequest req, AppleResponse res)
          Allows the AppleController implementation to make some business decissions in a given web application flow.
 String toString()
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalculationApple

public CalculationApple()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

process

public void process(AppleRequest req,
                    AppleResponse res)
             throws ProcessingException
Description copied from interface: AppleController
Allows the AppleController implementation to make some business decissions in a given web application flow.

Typically those decissions will be based upon what it can find inside the passed AppleRequest and result into setting specific aspects of the AppleResponse

Specified by:
process in interface AppleController
Throws:
ProcessingException


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