/** * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type. * Use as an alternative to {@link #channelFactory(ChannelFactory)}. * * @param channelType the type * @return {@code this} */ public DnsNameResolverBuilder channelType(Class<? extends DatagramChannel> channelType) { return channelFactory(new ReflectiveChannelFactory<DatagramChannel>(channelType)); }
/** * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type. * Use as an alternative to {@link #channelFactory(ChannelFactory)}. * * @param channelType the type * @return {@code this} */ public DnsNameResolverBuilder channelType(Class<? extends DatagramChannel> channelType) { return channelFactory(new ReflectiveChannelFactory<DatagramChannel>(channelType)); }
public DnsAddressResolverGroup( ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) { this(new DnsNameResolverBuilder()); dnsResolverBuilder.channelFactory(channelFactory).nameServerProvider(nameServerProvider); }
public DnsAddressResolverGroup( ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) { this(new DnsNameResolverBuilder()); dnsResolverBuilder.channelFactory(channelFactory).nameServerProvider(nameServerProvider); }
@SuppressWarnings("deprecation") @Override protected final AddressResolver<InetSocketAddress> newResolver(EventExecutor executor) throws Exception { if (!(executor instanceof EventLoop)) { throw new IllegalStateException( "unsupported executor type: " + StringUtil.simpleClassName(executor) + " (expected: " + StringUtil.simpleClassName(EventLoop.class)); } // we don't really need to pass channelFactory and nameServerProvider separately, // but still keep this to ensure backward compatibility with (potentially) override methods return newResolver((EventLoop) executor, dnsResolverBuilder.channelFactory(), dnsResolverBuilder.nameServerProvider()); }
/** * Creates a new {@link NameResolver}. Override this method to create an alternative {@link NameResolver} * implementation or override the default configuration. */ protected NameResolver<InetAddress> newNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) throws Exception { // once again, channelFactory and nameServerProvider are most probably set in builder already, // but I do reassign them again to avoid corner cases with override methods return dnsResolverBuilder.eventLoop(eventLoop) .channelFactory(channelFactory) .nameServerProvider(nameServerProvider) .build(); }
@SuppressWarnings("deprecation") @Override protected final AddressResolver<InetSocketAddress> newResolver(EventExecutor executor) throws Exception { if (!(executor instanceof EventLoop)) { throw new IllegalStateException( "unsupported executor type: " + StringUtil.simpleClassName(executor) + " (expected: " + StringUtil.simpleClassName(EventLoop.class)); } // we don't really need to pass channelFactory and nameServerProvider separately, // but still keep this to ensure backward compatibility with (potentially) override methods return newResolver((EventLoop) executor, dnsResolverBuilder.channelFactory(), dnsResolverBuilder.nameServerProvider()); }
/** * Creates a new {@link NameResolver}. Override this method to create an alternative {@link NameResolver} * implementation or override the default configuration. */ protected NameResolver<InetAddress> newNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) throws Exception { // once again, channelFactory and nameServerProvider are most probably set in builder already, // but I do reassign them again to avoid corner cases with override methods return dnsResolverBuilder.eventLoop(eventLoop) .channelFactory(channelFactory) .nameServerProvider(nameServerProvider) .build(); }
copiedBuilder.channelFactory(channelFactory);
copiedBuilder.channelFactory(channelFactory);
/** * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type. * Use as an alternative to {@link #channelFactory(ChannelFactory)}. * * @param channelType the type * @return {@code this} */ public DnsNameResolverBuilder channelType(Class<? extends DatagramChannel> channelType) { return channelFactory(new ReflectiveChannelFactory<DatagramChannel>(channelType)); }
/** * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type. * Use as an alternative to {@link #channelFactory(ChannelFactory)}. * * @param channelType the type * @return {@code this} */ public DnsNameResolverBuilder channelType(Class<? extends DatagramChannel> channelType) { return channelFactory(new ReflectiveChannelFactory<DatagramChannel>(channelType)); }
/** * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type. * Use as an alternative to {@link #channelFactory(ChannelFactory)}. * * @param channelType the type * @return {@code this} */ public DnsNameResolverBuilder channelType(Class<? extends DatagramChannel> channelType) { return channelFactory(new ReflectiveChannelFactory<DatagramChannel>(channelType)); }
public DnsAddressResolverGroup( ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) { this(new DnsNameResolverBuilder()); dnsResolverBuilder.channelFactory(channelFactory).nameServerProvider(nameServerProvider); }
public DnsAddressResolverGroup( ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) { this(new DnsNameResolverBuilder()); dnsResolverBuilder.channelFactory(channelFactory).nameServerProvider(nameServerProvider); }
/** * Creates a new {@link NameResolver}. Override this method to create an alternative {@link NameResolver} * implementation or override the default configuration. */ protected NameResolver<InetAddress> newNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddresses nameServerAddresses) throws Exception { return new DnsNameResolverBuilder(eventLoop) .channelFactory(channelFactory) .nameServerAddresses(nameServerAddresses) .build(); } }
@SuppressWarnings("deprecation") @Override protected final AddressResolver<InetSocketAddress> newResolver(EventExecutor executor) throws Exception { if (!(executor instanceof EventLoop)) { throw new IllegalStateException( "unsupported executor type: " + StringUtil.simpleClassName(executor) + " (expected: " + StringUtil.simpleClassName(EventLoop.class)); } // we don't really need to pass channelFactory and nameServerProvider separately, // but still keep this to ensure backward compatibility with (potentially) override methods return newResolver((EventLoop) executor, dnsResolverBuilder.channelFactory(), dnsResolverBuilder.nameServerProvider()); }
@SuppressWarnings("deprecation") @Override protected final AddressResolver<InetSocketAddress> newResolver(EventExecutor executor) throws Exception { if (!(executor instanceof EventLoop)) { throw new IllegalStateException( "unsupported executor type: " + StringUtil.simpleClassName(executor) + " (expected: " + StringUtil.simpleClassName(EventLoop.class)); } // we don't really need to pass channelFactory and nameServerProvider separately, // but still keep this to ensure backward compatibility with (potentially) override methods return newResolver((EventLoop) executor, dnsResolverBuilder.channelFactory(), dnsResolverBuilder.nameServerProvider()); }
/** * Creates a new {@link NameResolver}. Override this method to create an alternative {@link NameResolver} * implementation or override the default configuration. */ protected NameResolver<InetAddress> newNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) throws Exception { // once again, channelFactory and nameServerProvider are most probably set in builder already, // but I do reassign them again to avoid corner cases with override methods return dnsResolverBuilder.eventLoop(eventLoop) .channelFactory(channelFactory) .nameServerProvider(nameServerProvider) .build(); }
/** * Creates a new {@link NameResolver}. Override this method to create an alternative {@link NameResolver} * implementation or override the default configuration. */ protected NameResolver<InetAddress> newNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider) throws Exception { // once again, channelFactory and nameServerProvider are most probably set in builder already, // but I do reassign them again to avoid corner cases with override methods return dnsResolverBuilder.eventLoop(eventLoop) .channelFactory(channelFactory) .nameServerProvider(nameServerProvider) .build(); }