org.strutsit.chain
Class ChainFacadeImpl

java.lang.Object
  extended byorg.strutsit.chain.ChainFacadeImpl
All Implemented Interfaces:
ChainFacade

public final class ChainFacadeImpl
extends java.lang.Object
implements ChainFacade

Implementation of the ChainFacade-Interface. The Facade is a singleton. It holds the configuration of the chain-Framework.

Since:
JDK 1.4
Version:
$Revision: 1.9 $
Author:
Manfred Wolff

Method Summary
 void destroy()
          Frees all Resources.
 boolean execute(java.lang.String commandString, org.apache.commons.chain.Context context)
          Executes a chain or a single command by name.
static ChainFacade getInstance()
          Returns the singleton of the facade.
 void initFacade()
          Inits the framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ChainFacade getInstance()
Returns the singleton of the facade.

Returns:
The one and only instance of the facade.

initFacade

public void initFacade()
                throws ChainException
Inits the framework. The method has the following responsibilities:

Specified by:
initFacade in interface ChainFacade
Throws:
ChainException - if something fails
See Also:
ChainFacade.initFacade()

destroy

public void destroy()
Frees all Resources.

Specified by:
destroy in interface ChainFacade
See Also:
ChainFacade.destroy()

execute

public boolean execute(java.lang.String commandString,
                       org.apache.commons.chain.Context context)
                throws ChainException
Executes a chain or a single command by name.

Specified by:
execute in interface ChainFacade
Parameters:
commandString - The name of the command or chain.
context - The Context for executing
Returns:
True if the command can fulfill the operation, otherwise false
Throws:
ChainException - if something goes wrong


Copyright © 2004-2005 Struts-it community. All Rights Reserved.