net.rim.pushsdk.acknowledgement
Class AnyNotificationListener

java.lang.Object
  extended by net.rim.pushsdk.acknowledgement.NotificationListener
      extended by net.rim.pushsdk.acknowledgement.AnyNotificationListener

public class AnyNotificationListener
extends NotificationListener

Sample implementation of the "any" notification listener. It extends NotificationListener and sets the listenerType to ListenerType.ANY. Any class that extends this class should provide an implementation of the processNotification method.

Author:
dstrelbytsky

Field Summary
 
Fields inherited from class net.rim.pushsdk.acknowledgement.NotificationListener
listenerType
 
Constructor Summary
AnyNotificationListener()
          Constructs an "any" notification listener.
 
Method Summary
 void processNotification(String pushId, PushOutcome outcome)
          Processes the result notification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnyNotificationListener

public AnyNotificationListener()
Constructs an "any" notification listener.

Method Detail

processNotification

public void processNotification(String pushId,
                                PushOutcome outcome)
                         throws PushSDKException
Description copied from class: NotificationListener
Processes the result notification.

The client address (e.g. PIN) in the result notification from the PPG was mapped to the address in the provided PushOutcome using the currently known mapping. This may result in incorrect results if a subscriber or device swap occurred after the push request was issued.

Note: The PushOutcome.getAddress() may return a value of '*' (without the quotes) that indicates the code applies to all addresses of the push with the specified push id.

Specified by:
processNotification in class NotificationListener
Parameters:
pushId - push id to which the notification pertains
outcome - the outcome of pushing to a particular address
Throws:
PushSDKException - error from processing the result notification. The exception stack trace will have details of the error


Copyright © 2011 Research In Motion. All Rights Reserved.