org.perfectjpattern.core.behavioral.chainofresponsibility
Class AllHandleStrategy

java.lang.Object
  extended by org.perfectjpattern.core.behavioral.chainofresponsibility.AllHandleStrategy
All Implemented Interfaces:
IChainStrategy, IStrategy

public final class AllHandleStrategy
extends Object
implements IChainStrategy

Concrete implementation of IChainStrategy that allows all IHandler instances in the Chain to handle the given request.

AllHandleStrategy is stateless, reentrant and a Singleton therefore it may not be directly instantiated, neither it may be extended.

Version:
$Revision: 1.0 $ $Date: Nov 8, 2007 9:57:12 PM $
Author:
Giovanni Azua
 

Method Summary
static IChainStrategy getInstance()
          Returns Singleton instance of AllHandleStrategy.
 void process(IHandler<Object> aHandler, Object aRequest)
          Defines the decision-logic regarding handling and forwarding of the requests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IChainStrategy getInstance()
Returns Singleton instance of AllHandleStrategy.

Returns:
Singleton instance of AllHandleStrategy.

process

public void process(IHandler<Object> aHandler,
                    Object aRequest)
Defines the decision-logic regarding handling and forwarding of the requests.

Specified by:
process in interface IChainStrategy
Parameters:
aHandler - Chain of Responsibility IHandler instance.
aRequest - Request to process


Copyright © 2007-2009. All Rights Reserved.