All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jdroid.javaweb.push.DeviceMarshaller Maven / Gradle / Ivy

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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy