|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectar.com.fernandospr.wns.WnsService
public class WnsService
| Constructor Summary | |
|---|---|
WnsService(String sid,
String clientSecret)
|
|
WnsService(String sid,
String clientSecret,
boolean logging)
|
|
| Method Summary | |
|---|---|
protected void |
addOptionalHeaders(com.sun.jersey.api.client.WebResource.Builder webResourceBuilder,
WnsNotificationRequestOptional optional)
|
protected void |
addRequiredHeaders(com.sun.jersey.api.client.WebResource.Builder webResourceBuilder,
String type,
String accessToken)
|
protected WnsOAuthToken |
getAccessToken()
Based on http://msdn.microsoft.com/en-us/library/windows/apps/hh465407.aspx |
protected WnsNotificationResponse |
push(String channelUri,
String type,
WnsAbstractNotification notification,
int retriesLeft,
WnsNotificationRequestOptional optional)
|
WnsNotificationResponse |
pushBadge(String channelUri,
WnsBadge badge)
Pushes a badge to channelUri |
WnsNotificationResponse |
pushBadge(String channelUri,
WnsNotificationRequestOptional optional,
WnsBadge badge)
Pushes a badge to channelUri using optional headers |
WnsNotificationResponse |
pushTile(String channelUri,
WnsNotificationRequestOptional optional,
WnsTile tile)
Pushes a tile to channelUri using optional headers |
WnsNotificationResponse |
pushTile(String channelUri,
WnsTile tile)
Pushes a tile to channelUri |
WnsNotificationResponse |
pushToast(String channelUri,
WnsNotificationRequestOptional optional,
WnsToast toast)
Pushes a toast to channelUri using optional headers |
WnsNotificationResponse |
pushToast(String channelUri,
WnsToast toast)
Pushes a toast to channelUri |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WnsService(String sid,
String clientSecret)
throws WnsException
sid - clientSecret -
WnsException - when authentication fails
public WnsService(String sid,
String clientSecret,
boolean logging)
throws WnsException
sid - clientSecret - logging - true if System.out logging is needed
WnsException - when authentication fails| Method Detail |
|---|
protected WnsOAuthToken getAccessToken()
throws WnsException
WnsException - when authentication fails
public WnsNotificationResponse pushTile(String channelUri,
WnsTile tile)
throws WnsException
channelUri - tile - which should be built with WnsTileBuilder
WnsException - if it was unable to push the notification, please see response codes from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
public WnsNotificationResponse pushTile(String channelUri,
WnsNotificationRequestOptional optional,
WnsTile tile)
throws WnsException
channelUri - optional - tile - which should be built with WnsTileBuilder
WnsException - if it was unable to push the notification, please see response codes from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
public WnsNotificationResponse pushToast(String channelUri,
WnsToast toast)
throws WnsException
channelUri - toast - which should be built with WnsToastBuilder
WnsException - if it was unable to push the notification, please see response codes from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
public WnsNotificationResponse pushToast(String channelUri,
WnsNotificationRequestOptional optional,
WnsToast toast)
throws WnsException
channelUri - optional - toast - which should be built with WnsToastBuilder
WnsException - if it was unable to push the notification, please see response codes from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
public WnsNotificationResponse pushBadge(String channelUri,
WnsBadge badge)
throws WnsException
channelUri - badge - which should be built with WnsBadgeBuilder
WnsException - if it was unable to push the notification, please see response codes from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
public WnsNotificationResponse pushBadge(String channelUri,
WnsNotificationRequestOptional optional,
WnsBadge badge)
throws WnsException
channelUri - optional - badge - which should be built with WnsBadgeBuilder
WnsException - if it was unable to push the notification, please see response codes from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
protected WnsNotificationResponse push(String channelUri,
String type,
WnsAbstractNotification notification,
int retriesLeft,
WnsNotificationRequestOptional optional)
throws WnsException
channelUri - type - should be any of WnsNotificationTypenotification - retriesLeft - to push the notification if the token expires
WnsException - if it was unable to push the notification, please see response codes from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
protected void addOptionalHeaders(com.sun.jersey.api.client.WebResource.Builder webResourceBuilder,
WnsNotificationRequestOptional optional)
protected void addRequiredHeaders(com.sun.jersey.api.client.WebResource.Builder webResourceBuilder,
String type,
String accessToken)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||