com.jdroid.javaweb.push.PushResponse 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.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;
}
}