Project Wonder 2.0

er.wopaypal
Class PayPalNotificationListener

java.lang.Object
  extended byer.wopaypal.PayPalNotificationListener

public class PayPalNotificationListener
extends Object

The PayPalNotificationListener class is a receiver for notifications from PayPalAction's ipnAction method, which broadcasts notifications of different events having to do with "Instant Payment Notification" transaction notifications from PayPal. The observer gets registered to receive notifications, and the Delegate interface defines what it can do with the notifications. If a delegate is registered and implements some subset of the methods defined in the PayPalNotificationListener.Delegate interface, PayPalNotificationListener invokes the appropriate method on the delegate object.


Nested Class Summary
static interface PayPalNotificationListener.Delegate
          Interface for the delegate.
static class PayPalNotificationListener.Observer
          The Observer is the object which is registered (in WOPayPal) to listen for the NSNotifications broadcast by the PayPalAction's ipnAction method.
 
Field Summary
static String DeniedPayPalPaymentReceivedNotification
          Notification name when IPN returns DENIED result.
static String FailedPayPalPaymentReceivedNotification
          Notification name when IPN returns FAILED result.
static String InvalidPayPalPaymentReceivedNotification
          Notification name when IPN returns INVALID result.
static String PendingPayPalPaymentReceivedNotification
          Notification name when IPN returns PENDING result.
static String ValidPayPalPaymentReceivedNotification
          Notification name when IPN returns VALID result.
 
Constructor Summary
PayPalNotificationListener()
          Constructor.
 
Method Summary
protected static Object defaultDelegate()
          Method to return the default delegate object.
static Object delegate()
          Method to return the assigned delegate object.
static PayPalNotificationListener.Observer observer()
          Method to return the observer object.
static void setDelegate(Object obj)
          Method to assign the class's delegate object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DeniedPayPalPaymentReceivedNotification

public static final String DeniedPayPalPaymentReceivedNotification
Notification name when IPN returns DENIED result.

See Also:
Constant Field Values

FailedPayPalPaymentReceivedNotification

public static final String FailedPayPalPaymentReceivedNotification
Notification name when IPN returns FAILED result.

See Also:
Constant Field Values

InvalidPayPalPaymentReceivedNotification

public static final String InvalidPayPalPaymentReceivedNotification
Notification name when IPN returns INVALID result.

See Also:
Constant Field Values

PendingPayPalPaymentReceivedNotification

public static final String PendingPayPalPaymentReceivedNotification
Notification name when IPN returns PENDING result.

See Also:
Constant Field Values

ValidPayPalPaymentReceivedNotification

public static final String ValidPayPalPaymentReceivedNotification
Notification name when IPN returns VALID result.

See Also:
Constant Field Values
Constructor Detail

PayPalNotificationListener

public PayPalNotificationListener()
Constructor.

Method Detail

defaultDelegate

protected static Object defaultDelegate()
Method to return the default delegate object. Creates a new Object as the delegate if it's not assigned.

Returns:
Object

delegate

public static Object delegate()
Method to return the assigned delegate object. If one is not assigned, it returns the defaultDelegate object.

Returns:
Object that is assigned as the class' delegate.

setDelegate

public static void setDelegate(Object obj)
Method to assign the class's delegate object. Throws an IllegalArgumentException if it receives a null object to assign as the delegate.

Parameters:
obj - Object

observer

public static PayPalNotificationListener.Observer observer()
Method to return the observer object. If one is not assigned, it instantiates and returns a new Observer.

Returns:
Observer

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.