com.windowsazure.messaging.AdmRegistration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Notification-Hubs-java-sdk Show documentation
Show all versions of Notification-Hubs-java-sdk Show documentation
Azure Notification Hubs Java SDK for interacting with the data and management plane operations.
The newest version!
//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------
package com.windowsazure.messaging;
import java.util.Objects;
/**
* This class represents an Amazon device registration.
*/
public class AdmRegistration extends Registration {
private static final String ADM_NATIVE_REGISTRATION1 = "";
private static final String ADM_NATIVE_REGISTRATION2 = "";
private static final String ADM_NATIVE_REGISTRATION3 = " ";
protected String admRegistrationId;
/**
* Creates a new instance of the AdmRegistration class.
*/
public AdmRegistration() {
super();
}
/**
* Creates a new instance of the AdmRegistration class.
* @param registrationId The Azure Notification Hubs registration ID for the device.
* @param admRegistrationId The Amazon device registration ID.
*/
public AdmRegistration(String registrationId, String admRegistrationId) {
super(registrationId);
this.admRegistrationId = admRegistrationId;
}
/**
* Creates a new instance of the AdmRegistration class.
* @param admRegistrationId The Amazon device registration ID.
*/
public AdmRegistration(String admRegistrationId) {
super();
this.admRegistrationId = admRegistrationId;
}
/**
* Gets the Amazon registration ID for the device.
* @return The Amazon registration ID for the device.
*/
public String getAdmRegistrationId() {
return admRegistrationId;
}
/**
* Sets the Amazon registration ID for the device.
* @param value The Amazon registration ID for the device to set.
*/
public void setAdmRegistrationId(String value) {
admRegistrationId = value;
}
/**
* Gets the PNS handle for getting devices by channel.
* @return The PNS handle for getting devices by channel.
*/
@Override
public String getPnsHandle() { return admRegistrationId; }
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
AdmRegistration that = (AdmRegistration) o;
return Objects.equals(getAdmRegistrationId(), that.getAdmRegistrationId());
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), getAdmRegistrationId());
}
@Override
public String getXml() {
return ADM_NATIVE_REGISTRATION1 +
getTagsXml() +
ADM_NATIVE_REGISTRATION2 +
admRegistrationId +
ADM_NATIVE_REGISTRATION3;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy