|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.pap.PapServiceImpl
public class PapServiceImpl
Class implementing the PapService interface that defines push operations to send PAP 2.1/2.0 XML to a Push Proxy
Gateway (PPG) and parse the PAP XML responses.
| Constructor Summary | |
|---|---|
PapServiceImpl()
|
|
| Method Summary | |
|---|---|
CancelResponse |
cancel(String username,
String password,
CancelMessageControl cancelMessage)
Sends a cancel request using the attributes in the cancelMessage. |
void |
onNotification(ResultNotification resultNotification,
Map<String,String[]> notificationParameters)
Implement this method in order to perform custom actions on result notification. |
PushResponse |
push(String username,
String password,
String destination,
PushMessageControl pushMessage,
Content content)
Sends a push request with the specified content using the specified attributes. |
ResultNotificationResponseControl |
receiveNotification(String notificationMessage,
Map<String,String[]> requestParameters)
Called when a result notification message is received from the PPG (e.g. |
void |
setHttpClient(HttpClient httpClient)
Support for dependency injection. |
void |
setPushSDKProperties(PushSDKProperties pushSDKProperties)
Support for dependency injection. |
StatusQueryResponse |
statusQuery(String username,
String password,
StatusQueryMessageControl statusQueryMessage)
Sends a status query request using the attributes in the statusQueryMessage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PapServiceImpl()
| Method Detail |
|---|
public void setHttpClient(HttpClient httpClient)
PapServiceHttpClient implementation.
setHttpClient in interface PapServicehttpClient - the HTTP clientpublic void setPushSDKProperties(PushSDKProperties pushSDKProperties)
PapServicePushSDKProperties implementation.
setPushSDKProperties in interface PapServicepushSDKProperties - the push SDK properties
public PushResponse push(String username,
String password,
String destination,
PushMessageControl pushMessage,
Content content)
throws PushSDKException,
BadMessageException,
UnauthorizedException
PapServiceContent. If it has not, a Push-Message-ID header will be automatically added with the push id. This
may assist in implementing duplicate message detection on the device side and various other use cases.
push in interface PapServiceusername - the username of the Push Initiator (for a public (BIS) push, this would be the application id; for an enterprise
(BES) push, this might be null)password - the password of the Push Initiator (for a public (BIS) push, this would be the application password; for an
enterprise (BES) push, this might be null)destination - for a public (BIS) push, the application id to push the content to; for an enterprise (BES) push, the
application port to push the content topushMessage - the push message attributes needed to construct the PAP requestcontent - the content of the push message
PushSDKException - if the message could not be sent for various other reasons (e.g. a malformed PPG URL, if the PAP XML response
returned by the PPG could not be parsed by this SDK, etc.)
BadMessageException - if the PPG returned a badmessage-response (i.e. the PPG could not understand/parse the PAP XML
sent by the SDK)
UnauthorizedException - the push did not succeed due to authorization failure at the PPG
public CancelResponse cancel(String username,
String password,
CancelMessageControl cancelMessage)
throws PushSDKException,
BadMessageException,
UnauthorizedException
PapServicecancelMessage.
cancel in interface PapServiceusername - the username of the Push Initiator (for a public (BIS) push, this would be the application id; for an enterprise
(BES) push, this might be null)password - the password of the Push Initiator (for a public (BIS) push, this would be the application password; for an
enterprise (BES) push, this might be null)cancelMessage - the cancel message attributes needed to construct the PAP request
PushSDKException - if the cancel could not be sent for various other reasons (e.g. a malformed PPG URL, the PAP XML response
returned by the PPG could not be parsed by this SDK, etc.)
BadMessageException - if the PPG returned a badmessage-response (i.e. the PPG could not understand/parse the PAP XML
sent by this SDK)
UnauthorizedException - the cancel did not succeed due to authorization failure at the PPG
public StatusQueryResponse statusQuery(String username,
String password,
StatusQueryMessageControl statusQueryMessage)
throws PushSDKException,
BadMessageException,
UnauthorizedException
PapServicestatusQueryMessage.
statusQuery in interface PapServiceusername - the username of the Push Initiator (for a public (BIS) push, this would be the application id; for an enterprise
(BES) push, this might be null)password - the password of the Push Initiator (for a public (BIS) push, this would be the application password; for an
enterprise (BES) push, this might be null)statusQueryMessage - the status query message attributes needed to construct the PAP request
PushSDKException - if the PAP XML response returned by the PPG could not be parsed by this SDK
BadMessageException - if the PPG returned a badmessage-response (i.e. the PPG could not understand/parse the PAP XML
sent by this SDK)
UnauthorizedException - the status query did not succeed due to authorization failure at the PPG
public void onNotification(ResultNotification resultNotification,
Map<String,String[]> notificationParameters)
throws PushSDKException
PapService
onNotification in interface PapServiceresultNotification - the result notification sent by the PPGnotificationParameters - request parameters from the result notification sent by the PPG
PushSDKException - if the result notification cannot be processed
public ResultNotificationResponseControl receiveNotification(String notificationMessage,
Map<String,String[]> requestParameters)
PapServiceonNotification method with the result notification request.
receiveNotification in interface PapServicenotificationMessage - PAP result notification XML message as a UTF-8 stringrequestParameters - Request parameters from the result notification sent by the PPG
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||