public class TestPushService extends Object implements PushService
| Modifier and Type | Class and Description |
|---|---|
static class |
TestPushService.TestDevice |
| Constructor and Description |
|---|
TestPushService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDevice(Platform platform,
String id,
String deviceToken,
String userData) |
void |
clear() |
TestPushService.TestDevice |
getDeviceById(String id) |
List<TestPushService.TestDevice> |
getDevices() |
com.google.common.collect.Multimap<String,PushMessageWrapper> |
getMessages() |
void |
init() |
String |
registerDevice(Platform platform,
String deviceToken,
String userData)
register a device with the notification service.
|
void |
sendNotification(String deviceId,
PushMessageWrapper message)
send the message to the given device
|
@PostConstruct public void init()
public void clear()
public com.google.common.collect.Multimap<String,PushMessageWrapper> getMessages()
public List<TestPushService.TestDevice> getDevices()
public TestPushService.TestDevice getDeviceById(String id)
public String registerDevice(Platform platform, String deviceToken, String userData)
PushServiceregisterDevice in interface PushServiceplatform - the platform of the devicedeviceToken - the device tokenuserData - the custom data to save with the devicepublic void sendNotification(String deviceId, PushMessageWrapper message)
PushServicesendNotification in interface PushServicedeviceId - the internal id of the devicemessage - the message to sendCopyright © 2016 Taimos GmbH. All rights reserved.