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

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

The newest version!
package com.jdroid.javaweb.push;

import com.google.common.collect.Lists;
import com.jdroid.java.collections.Maps;

import java.util.List;
import java.util.Map;

public class PushResponse {

	private DeviceType deviceType;
	private List registrationTokensToRemove;
	private Map registrationTokensToReplace;
	private List registrationTokensToRetry;

	public PushResponse(DeviceType deviceType) {
		this.deviceType = deviceType;
		registrationTokensToRemove = Lists.newArrayList();
		registrationTokensToReplace = Maps.newHashMap();
		registrationTokensToRetry = Lists.newArrayList();
	}
	
	public void addRegistrationTokenToRemove(String registrationTokenToRemove) {
		registrationTokensToRemove.add(registrationTokenToRemove);
	}
	
	public void addRegistrationTokenToReplace(String oldRegistrationToken, String newRegistrationToken) {
		registrationTokensToReplace.put(oldRegistrationToken, newRegistrationToken);
	}

	public void addRegistrationTokenToRetry(String registrationTokenToRetry) {
		registrationTokensToRetry.add(registrationTokenToRetry);
	}
	
	public List getRegistrationTokensToRemove() {
		return registrationTokensToRemove;
	}
	public Map getRegistrationTokensToReplace() {
		return registrationTokensToReplace;
	}

	public List getRegistrationTokensToRetry() {
		return registrationTokensToRetry;
	}

	public DeviceType getDeviceType() {
		return deviceType;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy