ar.com.fernandospr.wns
Class WnsService

java.lang.Object
  extended by ar.com.fernandospr.wns.WnsService

public class WnsService
extends Object


Constructor Summary
WnsService(String sid, String clientSecret)
           
WnsService(String sid, String clientSecret, boolean logging)
           
WnsService(String sid, String clientSecret, WnsProxyProperties proxyProperties)
           
WnsService(String sid, String clientSecret, WnsProxyProperties proxyProperties, boolean logging)
           
 
Method Summary
 List<WnsNotificationResponse> pushBadge(List<String> channelUris, WnsBadge badge)
          Pushes a badge to channelUris
 List<WnsNotificationResponse> pushBadge(List<String> channelUris, WnsNotificationRequestOptional optional, WnsBadge badge)
          Pushes a badge to channelUris using optional headers
 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
 List<WnsNotificationResponse> pushRaw(List<String> channelUris, WnsNotificationRequestOptional optional, WnsRaw raw)
          Pushes a raw message to channelUris using optional headers
 List<WnsNotificationResponse> pushRaw(List<String> channelUris, WnsRaw raw)
          Pushes a raw message to channelUris
 WnsNotificationResponse pushRaw(String channelUri, WnsNotificationRequestOptional optional, WnsRaw raw)
          Pushes a raw message to channelUri using optional headers
 WnsNotificationResponse pushRaw(String channelUri, WnsRaw raw)
          Pushes a badge to channelUri
 List<WnsNotificationResponse> pushTile(List<String> channelUris, WnsNotificationRequestOptional optional, WnsTile tile)
          Pushes a tile to channelUris using optional headers
 List<WnsNotificationResponse> pushTile(List<String> channelUris, WnsTile tile)
          Pushes a tile to channelUris
 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
 List<WnsNotificationResponse> pushToast(List<String> channelUris, WnsNotificationRequestOptional optional, WnsToast toast)
          Pushes a toast to channelUris using optional headers
 List<WnsNotificationResponse> pushToast(List<String> channelUris, WnsToast toast)
          Pushes a toast to channelUris
 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

WnsService

public WnsService(String sid,
                  String clientSecret)
Parameters:
sid -
clientSecret -

WnsService

public WnsService(String sid,
                  String clientSecret,
                  WnsProxyProperties proxyProperties)
Parameters:
sid -
clientSecret -
proxyProperties -

WnsService

public WnsService(String sid,
                  String clientSecret,
                  WnsProxyProperties proxyProperties,
                  boolean logging)
Parameters:
sid -
clientSecret -
proxyProperties -
logging - true if System.out logging is needed

WnsService

public WnsService(String sid,
                  String clientSecret,
                  boolean logging)
Parameters:
sid -
clientSecret -
logging - true if System.out logging is needed
Method Detail

pushTile

public WnsNotificationResponse pushTile(String channelUri,
                                        WnsTile tile)
                                 throws WnsException
Pushes a tile to channelUri

Parameters:
channelUri -
tile - which should be built with WnsTileBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response"
Throws:
WnsException - when authentication fails

pushTile

public WnsNotificationResponse pushTile(String channelUri,
                                        WnsNotificationRequestOptional optional,
                                        WnsTile tile)
                                 throws WnsException
Pushes a tile to channelUri using optional headers

Parameters:
channelUri -
optional -
tile - which should be built with WnsTileBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushTile

public List<WnsNotificationResponse> pushTile(List<String> channelUris,
                                              WnsTile tile)
                                       throws WnsException
Pushes a tile to channelUris

Parameters:
channelUris -
tile - which should be built with WnsTileBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushTile

public List<WnsNotificationResponse> pushTile(List<String> channelUris,
                                              WnsNotificationRequestOptional optional,
                                              WnsTile tile)
                                       throws WnsException
Pushes a tile to channelUris using optional headers

Parameters:
channelUris -
optional -
tile - which should be built with WnsTileBuilder
Returns:
list of WnsNotificationResponse for each channelUri, please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushToast

public WnsNotificationResponse pushToast(String channelUri,
                                         WnsToast toast)
                                  throws WnsException
Pushes a toast to channelUri

Parameters:
channelUri -
toast - which should be built with WnsToastBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushToast

public WnsNotificationResponse pushToast(String channelUri,
                                         WnsNotificationRequestOptional optional,
                                         WnsToast toast)
                                  throws WnsException
Pushes a toast to channelUri using optional headers

Parameters:
channelUri -
optional -
toast - which should be built with WnsToastBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushToast

public List<WnsNotificationResponse> pushToast(List<String> channelUris,
                                               WnsToast toast)
                                        throws WnsException
Pushes a toast to channelUris

Parameters:
channelUris -
toast - which should be built with WnsToastBuilder
Returns:
list of WnsNotificationResponse for each channelUri, please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushToast

public List<WnsNotificationResponse> pushToast(List<String> channelUris,
                                               WnsNotificationRequestOptional optional,
                                               WnsToast toast)
                                        throws WnsException
Pushes a toast to channelUris using optional headers

Parameters:
channelUris -
optional -
toast - which should be built with WnsToastBuilder
Returns:
list of WnsNotificationResponse for each channelUri, please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushBadge

public WnsNotificationResponse pushBadge(String channelUri,
                                         WnsBadge badge)
                                  throws WnsException
Pushes a badge to channelUri

Parameters:
channelUri -
badge - which should be built with WnsBadgeBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushBadge

public WnsNotificationResponse pushBadge(String channelUri,
                                         WnsNotificationRequestOptional optional,
                                         WnsBadge badge)
                                  throws WnsException
Pushes a badge to channelUri using optional headers

Parameters:
channelUri -
optional -
badge - which should be built with WnsBadgeBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushBadge

public List<WnsNotificationResponse> pushBadge(List<String> channelUris,
                                               WnsBadge badge)
                                        throws WnsException
Pushes a badge to channelUris

Parameters:
channelUris -
badge - which should be built with WnsBadgeBuilder
Returns:
list of WnsNotificationResponse for each channelUri, please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushBadge

public List<WnsNotificationResponse> pushBadge(List<String> channelUris,
                                               WnsNotificationRequestOptional optional,
                                               WnsBadge badge)
                                        throws WnsException
Pushes a badge to channelUris using optional headers

Parameters:
channelUris -
optional -
badge - which should be built with WnsBadgeBuilder
Returns:
list of WnsNotificationResponse for each channelUri, please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushRaw

public WnsNotificationResponse pushRaw(String channelUri,
                                       WnsRaw raw)
                                throws WnsException
Pushes a badge to channelUri

Parameters:
channelUri -
raw - which should be built with WnsBadgeBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushRaw

public WnsNotificationResponse pushRaw(String channelUri,
                                       WnsNotificationRequestOptional optional,
                                       WnsRaw raw)
                                throws WnsException
Pushes a raw message to channelUri using optional headers

Parameters:
channelUri -
optional -
raw - which should be built with WnsRawBuilder
Returns:
WnsNotificationResponse please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushRaw

public List<WnsNotificationResponse> pushRaw(List<String> channelUris,
                                             WnsRaw raw)
                                      throws WnsException
Pushes a raw message to channelUris

Parameters:
channelUris -
raw - which should be built with WnsRawBuilder
Returns:
list of WnsNotificationResponse for each channelUri, please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails

pushRaw

public List<WnsNotificationResponse> pushRaw(List<String> channelUris,
                                             WnsNotificationRequestOptional optional,
                                             WnsRaw raw)
                                      throws WnsException
Pushes a raw message to channelUris using optional headers

Parameters:
channelUris -
optional -
raw - which should be built with WnsRawBuilder
Returns:
list of WnsNotificationResponse for each channelUri, please see response headers from http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response
Throws:
WnsException - when authentication fails


Copyright © 2016. All Rights Reserved.