KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > epayment > framework > IPaymentCommand


1 package epayment.framework;
2
3 /**
4  * The <code>IPaymentCommand</code> interface defines
5  * the common interface for all electronic payment
6  * actions.
7  * <p>
8  * Implementors of this interface encapsulate a payment
9  * request as an object which can be generically
10  * processed by the <code>PaymentProcessor</code>.
11  * The <code>PaymentProcessor</code> is responsible
12  * for installing an appropriate implementation of
13  * an <code>IGatewayAdapter</code>.
14  * <p>
15  * This class is strictly an example.
16  *
17  * @author <a HREF="mailto:mike@clarkware.com">Mike Clark</a>
18  * @author <a HREF="http://www.clarkware.com">Clarkware Consulting</a>
19  */

20  
21 public interface IPaymentCommand {
22
23     /**
24      * Executes this command using the specified payment
25      * adapter and returns a payment response.
26      *
27      * @param adapter Payment adapter.
28      * @return response Payment response.
29      * @throws PaymentException If an error occurs.
30      */

31     public IPaymentResponse execute(IGatewayAdapter adapter)
32         throws PaymentException;
33 }
34
Popular Tags