net.rim.pushsdk.query.subscription
Interface SubscriptionQueryService

All Known Implementing Classes:
SubscriptionQueryServiceImpl

public interface SubscriptionQueryService

Used to query the status of subscribers on the PPG end.

Note: This query can only be performed on PPGs that support this functionality (currently, only public (BIS) push).

Note: The PPG limits the number of times these queries can be called in a given time period and limits the number of addresses allowed per request.

Author:
mdandrea

Method Summary
 SubscriptionQueryResponse querySubscriptionStatus(String username, String password, Set<String> addresses)
          Queries the status of the given addresses on the PPG end.
 SubscriptionQueryResponse querySubscriptionStatus(String username, String password, SubQueryRequestStatus status)
          Query to determine what addresses on the PPG end have the given status.
 void setHttpClient(HttpClient httpClient)
          Support for dependency injection.
 void setPushSDKProperties(PushSDKProperties pushSDKProperties)
          Support for dependency injection.
 

Method Detail

querySubscriptionStatus

SubscriptionQueryResponse querySubscriptionStatus(String username,
                                                  String password,
                                                  Set<String> addresses)
                                                  throws PushSDKException,
                                                         SubQueryFailureException,
                                                         UnauthorizedException
Queries the status of the given addresses on the PPG end.

Important: This API is only supported by the public (BIS) PPG. Do not call this API if you are using the enterprise (BES) PPG.

Parameters:
username - the username of the Push Initiator (for a public (BIS) push, this would be the application id)
password - the password of the Push Initiator (for a public (BIS) push, this would be the application password)
addresses - the set of addresses to query
Returns:
the subscription query response
Throws:
IllegalArgumentException - if any of the information passed in fails validation
UnsupportedOperationException - if the PPG does not support a subscription query operation
SubQueryFailureException - if the subscription query XML request message cannot be processed successfully by the PPG
UnauthorizedException - if the username / password provided is invalid
PushSDKException - if any unrecoverable errors occur during the query

querySubscriptionStatus

SubscriptionQueryResponse querySubscriptionStatus(String username,
                                                  String password,
                                                  SubQueryRequestStatus status)
                                                  throws PushSDKException,
                                                         SubQueryFailureException,
                                                         UnauthorizedException
Query to determine what addresses on the PPG end have the given status.

Important: This API is only supported by the public (BIS) PPG. Do not call this API if you are using the enterprise (BES) PPG.

Parameters:
username - the username of the Push Initiator (for a public (BIS) push, this would be the application id)
password - the password of the Push Initiator (for a public (BIS) push, this would be the application password)
status - a status of subscribers on the PPG end
Returns:
the subscription query response
Throws:
IllegalArgumentException - if any of the information passed in fails validation
UnsupportedOperationException - if the PPG does not support a subscription query operation
SubQueryFailureException - if the subscription query XML request message cannot be processed successfully by the PPG
UnauthorizedException - if the username / password provided is invalid
PushSDKException - if any unrecoverable errors occur during the query

setHttpClient

void setHttpClient(HttpClient httpClient)
Support for dependency injection. This will override the default HttpClient implementation.

Parameters:
httpClient - the HTTP client

setPushSDKProperties

void setPushSDKProperties(PushSDKProperties pushSDKProperties)
Support for dependency injection. This will override the default PushSDKProperties implementation.

Parameters:
pushSDKProperties - the push SDK properties


Copyright © 2011 Research In Motion. All Rights Reserved.