net.rim.pushsdk.pap.control
Class QualityOfService

java.lang.Object
  extended by net.rim.pushsdk.pap.control.QualityOfService

public class QualityOfService
extends Object

Represents the quality of service attributes for a PAP push message.

Author:
mdicesare

Constructor Summary
QualityOfService()
          Default quality of service constructor.
 
Method Summary
 String getBearer()
          Gets the bearer associated with the quality of service.
 DeliveryMethod getDeliveryMethod()
          Gets the delivery method associated with the quality of service.
 boolean isBearerRequired()
          Whether or not the bearer is required.
 String print()
          Returns a string containing the quality of service wrapped in PAP XML tags.
 void setBearer(String bearer)
          Sets the bearer associated with the quality of service.
 void setBearerRequired(boolean bearerRequired)
          Sets whether the bearer is required or not.
 void setDeliveryMethod(DeliveryMethod deliveryMethod)
          Sets the delivery method associated with the quality of service.
 String toString()
          Constructs a String with all attributes in name = value format.
 void validateForPush()
          Validate the following for a push message's quality of service:
- The delivery method is not null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QualityOfService

public QualityOfService()
Default quality of service constructor.
The bearer required boolean defaults to false.
The delivery method defaults to NOTSPECIFIED.

Method Detail

getDeliveryMethod

public DeliveryMethod getDeliveryMethod()
Gets the delivery method associated with the quality of service.

Returns:
the delivery method

setDeliveryMethod

public void setDeliveryMethod(DeliveryMethod deliveryMethod)
Sets the delivery method associated with the quality of service.

Parameters:
deliveryMethod - the delivery method

getBearer

public String getBearer()
Gets the bearer associated with the quality of service.

Returns:
the bearer

setBearer

public void setBearer(String bearer)
Sets the bearer associated with the quality of service.

Parameters:
bearer - the bearer

isBearerRequired

public boolean isBearerRequired()
Whether or not the bearer is required.
If true, the specified bearer must be used.

Returns:
true if the bearer is required; false otherwise

setBearerRequired

public void setBearerRequired(boolean bearerRequired)
Sets whether the bearer is required or not.

Parameters:
bearerRequired - true if the bearer is required; false otherwise

print

public String print()
Returns a string containing the quality of service wrapped in PAP XML tags.

Returns:
a string in PAP XML format

validateForPush

public void validateForPush()
Validate the following for a push message's quality of service:
- The delivery method is not null


toString

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

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


Copyright © 2011 Research In Motion. All Rights Reserved.