@Test public void resolve() { final SRVDNSResolver resolver = new SRVDNSResolver(contextFactory); final Set<SRVRecord> records = resolver.resolve("_ldap._tcp.ldaptive.org"); Assert.assertEquals(records.size(), 3); for (SRVRecord record : records) { Assert.assertEquals( record.getLdapURL().getHostnameWithSchemeAndPort(), "ldap: Assert.assertEquals(record.getPort(), 389); Assert.assertEquals(record.getPriority(), 0); Assert.assertTrue(record.getTarget().endsWith(".ldaptive.org")); Assert.assertEquals(record.getWeight(), 100); } }
@Override public Set<SRVRecord> resolve(final String name) { if (name == null) { return super.resolve(DEFAULT_RECORD_NAME); } return super.resolve(name); }
SRVDNSResolver extends AbstractDNSResolver<SRVRecord> { @Override public Set<SRVRecord> resolve(final String name) { if (name == null) { return super.resolve(DEFAULT_RECORD_NAME); } return super.resolve(name); } }
SRVDNSResolver extends AbstractDNSResolver<SRVRecord> { @Override public Set<SRVRecord> resolve(final String name) { if (name == null) { return super.resolve(DEFAULT_RECORD_NAME); } return super.resolve(name); } SRVDNSResolver();  SRVDNSResolver(final DNSContextFactory factory);  SRVDNSResolver(final DNSContextFactory factory, final boolean ssl); }
SRVDNSResolver extends AbstractDNSResolver<SRVRecord> { @Override public Set<SRVRecord> resolve(final String name) { if (name == null) { return super.resolve(DEFAULT_RECORD_NAME); } return super.resolve(name); } SRVDNSResolver();  SRVDNSResolver(final DNSContextFactory factory);  SRVDNSResolver(final DNSContextFactory factory, final boolean ssl); @Override Set<SRVRecord> resolve(final String name); @Override String toString(); }
SRVDNSResolver extends AbstractDNSResolver<SRVRecord> { @Override public Set<SRVRecord> resolve(final String name) { if (name == null) { return super.resolve(DEFAULT_RECORD_NAME); } return super.resolve(name); } SRVDNSResolver();  SRVDNSResolver(final DNSContextFactory factory);  SRVDNSResolver(final DNSContextFactory factory, final boolean ssl); @Override Set<SRVRecord> resolve(final String name); @Override String toString();  }