Record getObject() { return new MXRecord(); }
Record getObject() { return new MXRecord(); }
Record getObject() { return new MXRecord(); }
Record getObject() { return new MXRecord(); }
/** * Creates a DNS MX record. * @param name The email domain or host used to determine where email should be sent to. * @param target The host server that email should be sent to. * @param ttl The time to live in seconds. * @param priority The priority of the target host. Lower priorities are preferred. * @return A DNSRecord representing an MX type record. * @throws ConfigurationStoreException */ public static DNSRecord createMXRecord(String name, String target, long ttl, int priority) throws ConfigurationStoreException { if (!name.endsWith(".")) name = name + "."; if (!target.endsWith(".")) target = target + "."; try { MXRecord rec = new MXRecord(Name.fromString(name), DClass.IN, ttl, priority, Name.fromString(target)); return DNSRecord.fromWire(rec.toWireCanonical()); } catch (Exception e) { throw new ConfigurationStoreException("Failed to create DNS MX record: " + e.getMessage(), e); } }
/** * Creates a DNS MX record. * @param name The email domain or host used to determine where email should be sent to. * @param target The host server that email should be sent to. * @param ttl The time to live in seconds. * @param priority The priority of the target host. Lower priorities are preferred. * @return A DNSRecord representing an MX type record. * @throws ConfigurationStoreException */ public static DNSRecord createMXRecord(String name, String target, long ttl, int priority) throws DNSRecordCreationException { if (!name.endsWith(".")) name = name + "."; if (!target.endsWith(".")) target = target + "."; try { MXRecord rec = new MXRecord(Name.fromString(name), DClass.IN, ttl, priority, Name.fromString(target)); return fromWire(rec.toWireCanonical()); } catch (Exception e) { throw new DNSRecordCreationException("Failed to create DNS MX record: " + e.getMessage(), e); } }
m = s_mxPattern.matcher(entry.data()); if (m.matches()) { zone.addRecord(new MXRecord(recordName, DClass.value(entry.dclass()), DEFAULT_TTL, Integer.valueOf(m.group(1)), Name.fromString(m.group(2)))); } else { LOG.error("Entry data '{}' does not match MX pattern", entry.data());