net.rim.pushsdk.pap.unmarshal
Class ResultNotification

java.lang.Object
  extended by net.rim.pushsdk.pap.unmarshal.PapMessage
      extended by net.rim.pushsdk.pap.unmarshal.ResultNotification
Direct Known Subclasses:
Notification

public class ResultNotification
extends PapMessage

Represents a PAP result notification.

Author:
mdicesare

Constructor Summary
ResultNotification()
          Default result notification constructor.
 
Method Summary
 String getAddress()
          Gets the address associated with the result notification.
 StatusCode getCode()
          Gets the code that indicates the final status of the push message for the address associated with the notification.
 String getDescription()
          Gets the textual description of the outcome of the push submission for the address associated with the notification.
 Date getEventTime()
          Gets the date and time at which the push message reached its final state.
 MessageState getMessageState()
          Gets the state of the push message for the address associated with the notification.
 QualityOfService getQualityOfService()
          Gets the quality of service for the push associated with the notification.
 Date getReceivedTime()
          Gets the date and time at which the PPG received the push request.
 String getSenderAddress()
          Gets the address of the PPG that processed the push associated with the notification.
 String getSenderName()
          Gets the textual name of the PPG that processed the push associated with the notification.
 void setAddress(String address)
          Sets the address associated with the result notification.
 void setCode(StatusCode code)
          Sets the code that indicates the final status of the push message for the address associated with the notification.
 void setDescription(String description)
          Sets the textual description of the outcome of the push submission for the address associated with the notification.
 void setEventTime(Date eventTime)
          Sets the date and time at which the push message reached its final state.
 void setMessageState(MessageState messageState)
          Sets the state of the push message for the address associated with the notification.
 void setQualityOfService(QualityOfService qualityOfService)
          Sets the quality of service for the push associated with the notification.
 void setReceivedTime(Date receivedTime)
          Sets the date and time at which the PPG received the push request.
 void setSenderAddress(String senderAddress)
          Sets the address of the PPG that processed the push associated with the notification.
 void setSenderName(String senderName)
          Sets the textual name of the PPG that processed the push associated with the notification.
 String toString()
          Constructs a String with all attributes in name = value format.
 void validate()
          Validates the result notification:
- the push id is not null or equal to the keyword "null"
- the message state is not null or equal to the keyword "null"
- the status code is not null or equal to the keyword "null"
- the address is not null
- the address does not contain the push_all token
 
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

ResultNotification

public ResultNotification()
Default result notification constructor.

Method Detail

getSenderAddress

public String getSenderAddress()
Gets the address of the PPG that processed the push associated with the notification.

Returns:
the address of the PPG

setSenderAddress

public void setSenderAddress(String senderAddress)
Sets the address of the PPG that processed the push associated with the notification.

Parameters:
senderAddress - the address of the PPG

getSenderName

public String getSenderName()
Gets the textual name of the PPG that processed the push associated with the notification.

Returns:
the textual name of the PPG

setSenderName

public void setSenderName(String senderName)
Sets the textual name of the PPG that processed the push associated with the notification.

Parameters:
senderName - the textual name of the PPG

getReceivedTime

public Date getReceivedTime()
Gets the date and time at which the PPG received the push request.

This can be used to calculate latency between the push submission time (the received time) and the time at which the message reached its final state (the event time).

Returns:
the date at which the PPG received the push request

setReceivedTime

public void setReceivedTime(Date receivedTime)
Sets the date and time at which the PPG received the push request.

This can be used to calculate latency between the push submission time (the received time) and the time at which the message reached its final state (the event time).

Parameters:
receivedTime - the date at which the PPG received the push request

getEventTime

public Date getEventTime()
Gets the date and time at which the push message reached its final state.

Returns:
the date at which the push message reached its final state

setEventTime

public void setEventTime(Date eventTime)
Sets the date and time at which the push message reached its final state.

Parameters:
eventTime - the date at which the push message reached its final state

getMessageState

public MessageState getMessageState()
Gets the state of the push message for the address associated with the notification.

Returns:
the state of the push message for the notification's address

setMessageState

public void setMessageState(MessageState messageState)
Sets the state of the push message for the address associated with the notification.

Parameters:
messageState - the state of the push message for the notification's address

getCode

public StatusCode getCode()
Gets the code that indicates the final status of the push message for the address associated with the notification.

Returns:
the push message's final status

setCode

public void setCode(StatusCode code)
Sets the code that indicates the final status of the push message for the address associated with the notification.

Parameters:
code - the push message's final status

getDescription

public String getDescription()
Gets the textual description of the outcome of the push submission for the address associated with the notification.

Returns:
the textual description of the outcome

setDescription

public void setDescription(String description)
Sets the textual description of the outcome of the push submission for the address associated with the notification.

Parameters:
description - the textual description of the outcome

getAddress

public String getAddress()
Gets the address associated with the result notification.

Returns:
the result notification's address

setAddress

public void setAddress(String address)
Sets the address associated with the result notification.

Parameters:
address - the result notification's address

getQualityOfService

public QualityOfService getQualityOfService()
Gets the quality of service for the push associated with the notification.

Returns:
the quality of service

setQualityOfService

public void setQualityOfService(QualityOfService qualityOfService)
Sets the quality of service for the push associated with the notification.

Parameters:
qualityOfService - the quality of service

validate

public void validate()
              throws IllegalArgumentException
Validates the result notification:
- the push id is not null or equal to the keyword "null"
- the message state is not null or equal to the keyword "null"
- the status code is not null or equal to the keyword "null"
- the address is not null
- the address does not contain the push_all token

Throws:
IllegalArgumentException - if the result notification fails validation

toString

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

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


Copyright © 2011 Research In Motion. All Rights Reserved.