net.rim.pushsdk.query.subscription
Class SubscriptionQueryServiceImpl

java.lang.Object
  extended by net.rim.pushsdk.query.subscription.SubscriptionQueryServiceImpl
All Implemented Interfaces:
SubscriptionQueryService

public class SubscriptionQueryServiceImpl
extends Object
implements SubscriptionQueryService

Implementation of the SubscriptionQueryService interface.

Author:
mdandrea

Constructor Summary
SubscriptionQueryServiceImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionQueryServiceImpl

public SubscriptionQueryServiceImpl()
Method Detail

setHttpClient

public void setHttpClient(HttpClient httpClient)
Description copied from interface: SubscriptionQueryService
Support for dependency injection. This will override the default HttpClient implementation.

Specified by:
setHttpClient in interface SubscriptionQueryService
Parameters:
httpClient - the HTTP client

setPushSDKProperties

public void setPushSDKProperties(PushSDKProperties pushSDKProperties)
Description copied from interface: SubscriptionQueryService
Support for dependency injection. This will override the default PushSDKProperties implementation.

Specified by:
setPushSDKProperties in interface SubscriptionQueryService
Parameters:
pushSDKProperties - the push SDK properties

querySubscriptionStatus

public SubscriptionQueryResponse querySubscriptionStatus(String username,
                                                         String password,
                                                         Set<String> addresses)
                                                  throws PushSDKException,
                                                         SubQueryFailureException,
                                                         UnauthorizedException
Description copied from interface: SubscriptionQueryService
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.

Specified by:
querySubscriptionStatus in interface SubscriptionQueryService
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:
PushSDKException - if any unrecoverable errors occur during the query
SubQueryFailureException - if the subscription query XML request message cannot be processed successfully by the PPG
UnauthorizedException - if the username / password provided is invalid

querySubscriptionStatus

public SubscriptionQueryResponse querySubscriptionStatus(String username,
                                                         String password,
                                                         SubQueryRequestStatus status)
                                                  throws PushSDKException,
                                                         SubQueryFailureException,
                                                         UnauthorizedException
Description copied from interface: SubscriptionQueryService
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.

Specified by:
querySubscriptionStatus in interface SubscriptionQueryService
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:
PushSDKException - if any unrecoverable errors occur during the query
SubQueryFailureException - if the subscription query XML request message cannot be processed successfully by the PPG
UnauthorizedException - if the username / password provided is invalid


Copyright © 2011 Research In Motion. All Rights Reserved.