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

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

public class HanoiApple
extends AbstractLogEnabled
implements AppleController

HanoiApple shows an apple maintaining the state of the fanous puzzle.


Field Summary
static int AUX
           
static int DST
           
 Object floatingDisk
           
 int moves
           
static int NONE
           
 int puzzleSize
           
static int SRC
           
 Stack[] stacks
           
 
Constructor Summary
HanoiApple()
           
 
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
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

SRC

public static final int SRC
See Also:
Constant Field Values

AUX

public static final int AUX
See Also:
Constant Field Values

DST

public static final int DST
See Also:
Constant Field Values

stacks

public Stack[] stacks

floatingDisk

public Object floatingDisk

moves

public int moves

puzzleSize

public int puzzleSize
Constructor Detail

HanoiApple

public HanoiApple()
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.