File: IPaymentCommand.java

package info (click to toggle)
libjdepend-java 2.9-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 800 kB
  • ctags: 781
  • sloc: java: 3,873; xml: 549; sh: 6; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package epayment.framework;

/**
 * The <code>IPaymentCommand</code> interface defines
 * the common interface for all electronic payment 
 * actions.
 * <p>
 * Implementors of this interface encapsulate a payment
 * request as an object which can be generically 
 * processed by the <code>PaymentProcessor</code>.
 * The <code>PaymentProcessor</code> is responsible
 * for installing an appropriate implementation of
 * an <code>IGatewayAdapter</code>.
 * <p>
 * This class is strictly an example.
 *
 * @author <a href="mailto:mike@clarkware.com">Mike Clark</a>
 * @author <a href="http://www.clarkware.com">Clarkware Consulting</a>
 */
 
public interface IPaymentCommand {

	/**
	 * Executes this command using the specified payment 
	 * adapter and returns a payment response.
	 *
	 * @param adapter Payment adapter.
	 * @return response Payment response.
	 * @throws PaymentException If an error occurs.
	 */
	public IPaymentResponse execute(IGatewayAdapter adapter)
		throws PaymentException;  	
}