@Test(groups = "netty") public void getLdapURL() throws Exception { final SimpleNettyServer server = new SimpleNettyServer(); try { final InetSocketAddress address = server.start(); final NettyConnection conn = new NettyConnection( ConnectionConfig.builder() .url( "ldap: .build(), NioSocketChannel.class, new NioEventLoopGroup( 0, new ThreadPerTaskExecutor(new DefaultThreadFactory(NettyConnectionTest.class, true, Thread.NORM_PRIORITY))), null, true); try { conn.open(); Assert.assertNotNull(conn.getLdapURL()); Assert.assertEquals(conn.getLdapURL().getScheme(), "ldap"); Assert.assertEquals(conn.getLdapURL().getHostname(), address.getHostName()); Assert.assertEquals(conn.getLdapURL().getPort(), address.getPort()); Assert.assertFalse(conn.getLdapURL().isDefaultBaseDn()); Assert.assertEquals(conn.getLdapURL().getBaseDn(), "dc=ldaptive,dc=org"); Assert.assertFalse(conn.getLdapURL().isDefaultAttributes()); Assert.assertEquals(conn.getLdapURL().getAttributes(), new String[] {"cn", "sn"}); Assert.assertFalse(conn.getLdapURL().isDefaultScope()); Assert.assertEquals(conn.getLdapURL().getScope(), SearchScope.ONELEVEL); Assert.assertFalse(conn.getLdapURL().isDefaultFilter()); Assert.assertEquals(conn.getLdapURL().getFilter(), "(uid=dfisher)"); } finally { conn.close(); Assert.assertFalse(conn.isOpen()); } } finally { server.stop(); } }
@Override public LdapURL getLdapURL() { return ldapURL; }
NettyConnection extends TransportConnection { @Override public LdapURL getLdapURL() { return ldapURL; } }
NettyConnection extends TransportConnection { @Override public LdapURL getLdapURL() { return ldapURL; } NettyConnection(
    final ConnectionConfig config,
    final Class<? extends Channel> type,
    final EventLoopGroup ioGroup,
    final EventLoopGroup messageGroup,
    final boolean shutdownGroups); }
NettyConnection extends TransportConnection { @Override public LdapURL getLdapURL() { return ldapURL; } NettyConnection(
    final ConnectionConfig config,
    final Class<? extends Channel> type,
    final EventLoopGroup ioGroup,
    final EventLoopGroup messageGroup,
    final boolean shutdownGroups); @Override LdapURL getLdapURL(); @Override @SuppressWarnings("unchecked") BindResponse operation(final SaslClientRequest request); @Override @SuppressWarnings("unchecked") BindResponse operation(final DefaultSaslClientRequest request); @Override void operation(final AbandonRequest request); @Override DefaultOperationHandle<AddRequest, AddResponse> operation(final AddRequest request); @Override BindOperationHandle operation(final BindRequest request); @Override DefaultCompareOperationHandle operation(final CompareRequest request); @Override DefaultOperationHandle<DeleteRequest, DeleteResponse> operation(final DeleteRequest request); @Override DefaultExtendedOperationHandle operation(final ExtendedRequest request); @Override DefaultOperationHandle<ModifyRequest, ModifyResponse> operation(final ModifyRequest request); @Override DefaultOperationHandle<ModifyDnRequest, ModifyDnResponse> operation(final ModifyDnRequest request); @Override DefaultSearchOperationHandle operation(final SearchRequest request); @Override void close(final RequestControl... controls); boolean isOpen(); @Override String toString(); }
NettyConnection extends TransportConnection { @Override public LdapURL getLdapURL() { return ldapURL; } NettyConnection(
    final ConnectionConfig config,
    final Class<? extends Channel> type,
    final EventLoopGroup ioGroup,
    final EventLoopGroup messageGroup,
    final boolean shutdownGroups); @Override LdapURL getLdapURL(); @Override @SuppressWarnings("unchecked") BindResponse operation(final SaslClientRequest request); @Override @SuppressWarnings("unchecked") BindResponse operation(final DefaultSaslClientRequest request); @Override void operation(final AbandonRequest request); @Override DefaultOperationHandle<AddRequest, AddResponse> operation(final AddRequest request); @Override BindOperationHandle operation(final BindRequest request); @Override DefaultCompareOperationHandle operation(final CompareRequest request); @Override DefaultOperationHandle<DeleteRequest, DeleteResponse> operation(final DeleteRequest request); @Override DefaultExtendedOperationHandle operation(final ExtendedRequest request); @Override DefaultOperationHandle<ModifyRequest, ModifyResponse> operation(final ModifyRequest request); @Override DefaultOperationHandle<ModifyDnRequest, ModifyDnResponse> operation(final ModifyDnRequest request); @Override DefaultSearchOperationHandle operation(final SearchRequest request); @Override void close(final RequestControl... controls); boolean isOpen(); @Override String toString();  }