public AlertNotification alertNotification(byte[] data) throws PDUStringException { AlertNotification req = new AlertNotification(); SequentialBytesReader reader = new SequentialBytesReader(data); assignHeader(req, reader); req.setSourceAddrTon(reader.readByte()); req.setSourceAddrNpi(reader.readByte()); req.setSourceAddr(reader.readCString()); StringValidator.validateString(req.getSourceAddr(), StringParameter.SOURCE_ADDR); req.setEsmeAddrTon(reader.readByte()); req.setEsmeAddrNpi(reader.readByte()); /* * No validation on esme_addr. * There is no response to alert_notificaion command, so error will be * ignored. */ req.setEsmeAddr(reader.readCString()); req.setOptionalParameters(readOptionalParameters(reader)); return req; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; final AlertNotification other = (AlertNotification)obj; if (!hasEqualEsmeAddr(other)) { return false; } if (esmeAddrNpi != other.esmeAddrNpi) return false; if (esmeAddrTon != other.esmeAddrTon) return false; if (!Arrays.equals(optionalParameters, other.optionalParameters)) return false; if (!hasEqualSourceAddr(other)) { return false; } if (sourceAddrNpi != other.sourceAddrNpi) return false; if (sourceAddrTon != other.sourceAddrTon) return false; return true; }
public AlertNotification alertNotification(byte[] data) throws PDUStringException { AlertNotification req = new AlertNotification(); SequentialBytesReader reader = new SequentialBytesReader(data); assignHeader(req, reader); req.setSourceAddrTon(reader.readByte()); req.setSourceAddrNpi(reader.readByte()); req.setSourceAddr(reader.readCString()); StringValidator.validateString(req.getSourceAddr(), StringParameter.SOURCE_ADDR); req.setEsmeAddrTon(reader.readByte()); req.setEsmeAddrNpi(reader.readByte()); /* * No validation on esme_addr. * There is no response to alert_notificaion command, so error will be * ignored. */ req.setEsmeAddr(reader.readCString()); req.setOptionalParameters(readOptionalParameters(reader)); return req; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; final AlertNotification other = (AlertNotification)obj; if (!hasEqualEsmeAddr(other)) { return false; } if (esmeAddrNpi != other.esmeAddrNpi) return false; if (esmeAddrTon != other.esmeAddrTon) return false; if (!Arrays.equals(optionalParameters, other.optionalParameters)) return false; if (!hasEqualSourceAddr(other)) { return false; } if (sourceAddrNpi != other.sourceAddrNpi) return false; if (sourceAddrTon != other.sourceAddrTon) return false; return true; }
public AlertNotification alertNotification(byte[] data) throws PDUStringException { AlertNotification req = new AlertNotification(); SequentialBytesReader reader = new SequentialBytesReader(data); assignHeader(req, reader); req.setSourceAddrTon(reader.readByte()); req.setSourceAddrNpi(reader.readByte()); req.setSourceAddr(reader.readCString()); StringValidator.validateString(req.getSourceAddr(), StringParameter.SOURCE_ADDR); req.setEsmeAddrTon(reader.readByte()); req.setEsmeAddrNpi(reader.readByte()); /* * No validation on esme_addr. * There is no response to alert_notificaion command, so error will be * ignored. */ req.setEsmeAddr(reader.readCString()); req.setOptionalParameters(readOptionalParameters(reader)); return req; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; final AlertNotification other = (AlertNotification)obj; if (!hasEqualEsmeAddr(other)) { return false; } if (esmeAddrNpi != other.esmeAddrNpi) return false; if (esmeAddrTon != other.esmeAddrTon) return false; if (!Arrays.equals(optionalParameters, other.optionalParameters)) return false; if (!hasEqualSourceAddr(other)) { return false; } if (sourceAddrNpi != other.sourceAddrNpi) return false; if (sourceAddrTon != other.sourceAddrTon) return false; return true; }
public AlertNotification alertNotification(byte[] data) throws PDUStringException { AlertNotification req = new AlertNotification(); SequentialBytesReader reader = new SequentialBytesReader(data); assignHeader(req, reader); req.setSourceAddrTon(reader.readByte()); req.setSourceAddrNpi(reader.readByte()); req.setSourceAddr(reader.readCString()); StringValidator.validateString(req.getSourceAddr(), StringParameter.SOURCE_ADDR); req.setEsmeAddrTon(reader.readByte()); req.setEsmeAddrNpi(reader.readByte()); /* * No validation on esme_addr. * There is no response to alert_notificaion command, so error will be * ignored. */ req.setEsmeAddr(reader.readCString()); req.setOptionalParameters(readOptionalParameters(reader)); return req; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; final AlertNotification other = (AlertNotification)obj; if (!hasEqualEsmeAddr(other)) { return false; } if (esmeAddrNpi != other.esmeAddrNpi) return false; if (esmeAddrTon != other.esmeAddrTon) return false; if (!Arrays.equals(optionalParameters, other.optionalParameters)) return false; if (!hasEqualSourceAddr(other)) { return false; } if (sourceAddrNpi != other.sourceAddrNpi) return false; if (sourceAddrTon != other.sourceAddrTon) return false; return true; }