com.jdroid.javaweb.push.DeviceMarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdroid-java-webapp Show documentation
Show all versions of jdroid-java-webapp Show documentation
Jdroid library for Java Web apps
The newest version!
package com.jdroid.javaweb.push;
import com.jdroid.java.json.JsonMap;
import com.jdroid.java.marshaller.Marshaller;
import com.jdroid.java.marshaller.MarshallerMode;
import java.util.Map;
public class DeviceMarshaller implements Marshaller {
@Override
public JsonMap marshall(Device device, MarshallerMode mode, Map extras) {
JsonMap jsonMap = new JsonMap(mode, extras);
jsonMap.put("instanceId", device.getInstanceId());
jsonMap.put("deviceGroupId", device.getDeviceGroupId());
jsonMap.put("deviceType", device.getDeviceType());
jsonMap.put("registrationToken", device.getRegistrationToken());
return jsonMap;
}
}