if(!(message instanceof Update)) return null; // For now
update = (Update) message;
qualified = configuration.qualifiedDomainName(update.name, update.moniker);
address = InetAddress.getByName(update.address);
} catch (IOException e) {
throw new ProtocolCodingException(e);
}
int ttl = configuration.getTtl(update.moniker);
Record record;
if("ipv4".equals(update.family)) {
record = new ARecord(qualified, DClass.IN, ttl, address);
} else if ("ipv6".equals(update.family)) {
record = new AAAARecord(qualified, DClass.IN, ttl, address);
} else {
throw new ProtocolCodingException("Can't decode " + new String(data));
}
return record;
}