It is different, Wendy, if you mean commons-chain.

There is an interface Command with the method 

    boolean execute(Context context) throws Exception;

There is an interface Chain which extends Command and has the methods:

    boolean execute(Context context) throws Exception;
    boolean execute(Context context) throws Exception;

There is an interface Filter which extends Command and which has the method:

    boolean postprocess(Context context, Exception exception);

There is a tag interface Context which extends Map.

There is an interface Catalog with the field:

    public static final String CATALOG_KEY = "org.apache.commons.chain.CATALOG";

and the methods:

    void addCommand(String name, Command command);
    Command getCommand(String name);
    Iterator getNames();

And, there is an abstract class CatalogFactory used to store and
retrieve Catalogs with the public methods:

    public abstract Catalog getCatalog();
    public abstract void setCatalog(Catalog catalog);
    public abstract Catalog getCatalog(String name);
    public abstract void addCatalog(String name, Catalog catalog);
    public abstract Iterator getNames();

the static fields:

    private static Map factories = new HashMap();

the static methods:

    public static CatalogFactory getInstance() {
        CatalogFactory factory = null;
        ClassLoader cl = getClassLoader();
        synchronized (factories) {
            factory = (CatalogFactory) factories.get(cl);
            if (factory == null) {
                factory = new CatalogFactoryBase();
                factories.put(cl, factory);
            }
        }
        return factory;
    }
    
    public static void clear() {
        synchronized (factories) {
            factories.remove(getClassLoader());
        }
    }

and the private methods:

    private static ClassLoader getClassLoader() {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null) {
            cl = CatalogFactory.class.getClassLoader();
        }
        return cl;
    }


The interfaces Chain, Context, Catalog, and CatalogFactory are
implemented with ChainBase, ContextBase, CatalogBase, and
CatalogFactoryBase.  There are also "generic" classes CopyCommand and
RemoveCommand implementing Command as well as LookupCommand
implementing Filter.

There are also five (5) configuration classes:

    ConfigRuleSet extending org.apache.commons.digester.RuleSetBase
    ConfigRegisterRule extending org.apache.commons.digester.Rule
    ConfigParser
    ConfigDefineRule extending org.apache.commons.digester.Rule
    ConfigCatalogRule extending org.apache.commons.digester.Rule

Anyway, you get the idea.

Jack



  


On Fri, 07 Jan 2005 16:50:57 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
> > Eh, I feel like I've hijacked this thread now, so let me get off this
> > topic for now.  Thanks for your insight though Joe!
> 
> Go right ahead-- I got my answer in that I never cared about
> RequestProcessor, so I don't need to worry about Chain too much.  For some
> reason I thought it was something else entirely (something to help move
> users through a series of required steps) and was curious.
> 
> --
> Wendy Smoak
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
------------------------------

"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

-----------------------------------------------

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank y ou for your cooperation."

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to