org.bidib.wizard.localhost.event.SubscriberEvent Maven / Gradle / Ivy
package org.bidib.wizard.localhost.event;
public class SubscriberEvent {
public enum SubscribeAction {
add, remove;
}
private final SubscribeAction action;
private final byte[] nodeAddress;
private Long uniqueId;
private Integer messageClasses;
public SubscriberEvent(final SubscribeAction action, final byte[] nodeAddress,
final Integer messageClasses) {
this.action = action;
this.nodeAddress = nodeAddress;
this.messageClasses = messageClasses;
}
public SubscriberEvent(final SubscribeAction action, final byte[] nodeAddress) {
this(action, nodeAddress, null);
}
/**
* @return the action
*/
public SubscribeAction getAction() {
return action;
}
/**
* @return the nodeAddress
*/
public byte[] getNodeAddress() {
return nodeAddress;
}
/**
* @return the uniqueId
*/
public Long getUniqueId() {
return uniqueId;
}
/**
* @param uniqueId
* the uniqueId to set
*/
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public SubscriberEvent withUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
return this;
}
/**
* @return the messageClasses
*/
public Integer getMessageClasses() {
return messageClasses;
}
/**
* @param messageClasses
* the messageClasses to set
*/
public void setMessageClasses(Integer messageClasses) {
this.messageClasses = messageClasses;
}
}