org.perfectjpattern.core.behavioral.command
Class AbstractReceiver<P,R>

java.lang.Object
  extended by org.perfectjpattern.core.behavioral.command.AbstractReceiver<P,R>
All Implemented Interfaces:
IReceiver<P,R>
Direct Known Subclasses:
Open, Paste

public abstract class AbstractReceiver<P,R>
extends Object
implements IReceiver<P,R>

Reusable base abstract implementation of IReceiver

Version:
$Revision: 1.0 $Date: Apr 13, 2008 2:24:53 PM $
Author:
Giovanni Azua
 

Constructor Summary
AbstractReceiver()
           
 
Method Summary
protected  P getParameter()
          Returns the previously assigned Parameter
 R getResult()
          Returns result out of executing this IReceiver.
 void setParameter(P aParameter)
          Sets the input parameter required for the execution of this IReceiver.
protected  void setResult(R aResult)
          Sets the Result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.perfectjpattern.core.api.behavioral.command.IReceiver
execute
 

Constructor Detail

AbstractReceiver

public AbstractReceiver()
Method Detail

getResult

public R getResult()
Returns result out of executing this IReceiver.

Specified by:
getResult in interface IReceiver<P,R>
Returns:
Result out of executing this IReceiver.

setParameter

public void setParameter(P aParameter)
                  throws IllegalArgumentException
Sets the input parameter required for the execution of this IReceiver.

Specified by:
setParameter in interface IReceiver<P,R>
Parameters:
aParameter - Parameter required for executing the IReceiver.
Throws:
IllegalArgumentException - 'aParameter' must not be null.

getParameter

protected P getParameter()
Returns the previously assigned Parameter

Returns:
the parameter

setResult

protected void setResult(R aResult)
Sets the Result

Parameters:
aResult - the result to set


Copyright © 2007-2009. All Rights Reserved.