public class PushServerClient extends Object
| Constructor and Description |
|---|
PushServerClient()
Default constructor.
|
PushServerClient(String serviceBaseUrl)
Constructor with a push server base URL.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
registerDevice(Long appId,
String token,
MobilePlatform platform)
Register anonymous device to the push server.
|
boolean |
registerDevice(Long appId,
String token,
MobilePlatform platform,
String activationId)
Register device associated with activation ID to the push server.
|
io.getlime.core.rest.model.base.response.ObjectResponse<PushSendResult> |
sendNotification(Long appId,
PushMessage pushMessage)
Send a single push message to application with given ID.
|
io.getlime.core.rest.model.base.response.ObjectResponse<PushSendResult> |
sendNotificationBatch(Long appId,
List<PushMessage> batch)
Send a push message batch to application with given ID.
|
void |
setServiceBaseUrl(String serviceBaseUrl)
Set the service base URL.
|
public PushServerClient()
public PushServerClient(String serviceBaseUrl)
serviceBaseUrl - URL pointing to the running push server instance, for example "http://localhost:8080/powerauth-push-server".public void setServiceBaseUrl(String serviceBaseUrl)
serviceBaseUrl - Base URL.public boolean registerDevice(Long appId, String token, MobilePlatform platform) throws PushServerClientException
appId - PowerAuth 2.0 application app ID.token - Token received from the push service provider (APNs, FCM).platform - Mobile platform (iOS, Android).PushServerClientExceptionpublic boolean registerDevice(Long appId, String token, MobilePlatform platform, String activationId) throws PushServerClientException
appId - PowerAuth 2.0 application app ID.token - Token received from the push service provider (APNs, FCM).platform - Mobile platform (iOS, Android).activationId - PowerAuth 2.0 activation ID.PushServerClientExceptionpublic io.getlime.core.rest.model.base.response.ObjectResponse<PushSendResult> sendNotification(Long appId, PushMessage pushMessage) throws PushServerClientException
appId - PowerAuth 2.0 application app ID.pushMessage - Push message to be sent.PushServerClientExceptionpublic io.getlime.core.rest.model.base.response.ObjectResponse<PushSendResult> sendNotificationBatch(Long appId, List<PushMessage> batch) throws PushServerClientException
appId - PowerAuth 2.0 application app ID.batch - Push message batch to be sent.PushServerClientExceptionCopyright © 2016–2017 Lime - HighTech Solutions Inc.. All rights reserved.