net.rim.pushsdk.acknowledgement
Class Notification

java.lang.Object
  extended by net.rim.pushsdk.pap.unmarshal.PapMessage
      extended by net.rim.pushsdk.pap.unmarshal.ResultNotification
          extended by net.rim.pushsdk.acknowledgement.Notification

public class Notification
extends ResultNotification

Represents a PAP result notification along with additional details associated with this notification.

Author:
mdandrea

Constructor Summary
Notification()
          Default notification constructor.
Notification(ResultNotification resultNotification)
          Constructs a notification with all the fields initialized from the given result notification.
Notification(ResultNotification resultNotification, String pushApplicationId)
          Constructs a notification with the given push application id and all the fields initialized from the given result notification.
 
Method Summary
 Integer getAddressCount()
          Gets a count of all the addresses being pushed to for the push associated with the notification.
 String getPushApplicationId()
          Gets the push application id associated with the notification.
 boolean isLast()
          Whether or not this is the last notification being processed for the push it is associated with.
 void setAddressCount(Integer addressCount)
          Sets the count of all the addresses being pushed to for the push associated with the notification.
 void setLast(boolean last)
          Set to true if this is the last notification being processed for the push it is associated with.
 void setPushApplicationId(String pushApplicationId)
          Sets the push application id to be associated with the notification.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class net.rim.pushsdk.pap.unmarshal.ResultNotification
getAddress, getCode, getDescription, getEventTime, getMessageState, getQualityOfService, getReceivedTime, getSenderAddress, getSenderName, setAddress, setCode, setDescription, setEventTime, setMessageState, setQualityOfService, setReceivedTime, setSenderAddress, setSenderName, validate
 
Methods inherited from class net.rim.pushsdk.pap.unmarshal.PapMessage
getPushId, setPushId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Notification

public Notification()
Default notification constructor.


Notification

public Notification(ResultNotification resultNotification)
Constructs a notification with all the fields initialized from the given result notification.

Parameters:
resultNotification - a result notification

Notification

public Notification(ResultNotification resultNotification,
                    String pushApplicationId)
Constructs a notification with the given push application id and all the fields initialized from the given result notification.

Parameters:
resultNotification - a result notification
pushApplicationId - a push application id
Method Detail

getPushApplicationId

public String getPushApplicationId()
Gets the push application id associated with the notification.

Returns:
the push application id

setPushApplicationId

public void setPushApplicationId(String pushApplicationId)
Sets the push application id to be associated with the notification.

Parameters:
pushApplicationId - the push application id

getAddressCount

public Integer getAddressCount()
Gets a count of all the addresses being pushed to for the push associated with the notification.

Returns:
the address count

setAddressCount

public void setAddressCount(Integer addressCount)
Sets the count of all the addresses being pushed to for the push associated with the notification.

Parameters:
addressCount - the address count

isLast

public boolean isLast()
Whether or not this is the last notification being processed for the push it is associated with.

Returns:
true if it is the last notification; false otherwise

setLast

public void setLast(boolean last)
Set to true if this is the last notification being processed for the push it is associated with.

Parameters:
last - true if it is the last notification; false otherwise

toString

public String toString()
Constructs a String with all attributes in name = value format.

Overrides:
toString in class ResultNotification
Returns:
a String representation of this object.


Copyright © 2011 Research In Motion. All Rights Reserved.