public class io.vertx.core.impl.AddressResolver
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.vertx.core.impl.AddressResolver
super_class: java.lang.Object
{
private static final io.vertx.core.impl.logging.Logger log;
descriptor: Lio/vertx/core/impl/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern NDOTS_OPTIONS_PATTERN;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern ROTATE_OPTIONS_PATTERN;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
public static final int DEFAULT_NDOTS_RESOLV_OPTION;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final boolean DEFAULT_ROTATE_RESOLV_OPTION;
descriptor: Z
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private final io.vertx.core.Vertx vertx;
descriptor: Lio/vertx/core/Vertx;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final io.netty.resolver.AddressResolverGroup<java.net.InetSocketAddress> resolverGroup;
descriptor: Lio/netty/resolver/AddressResolverGroup;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lio/netty/resolver/AddressResolverGroup<Ljava/net/InetSocketAddress;>;
private final io.vertx.core.spi.resolver.ResolverProvider provider;
descriptor: Lio/vertx/core/spi/resolver/ResolverProvider;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=5, args_size=0
0: ldc Lio/vertx/core/impl/AddressResolver;
invokestatic io.vertx.core.impl.logging.LoggerFactory.getLogger:(Ljava/lang/Class;)Lio/vertx/core/impl/logging/Logger;
putstatic io.vertx.core.impl.AddressResolver.log:Lio/vertx/core/impl/logging/Logger;
1: ldc "ndots:[ \\t\\f]*(\\d)+"
invokestatic io.vertx.core.impl.AddressResolver.resolvOption:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic io.vertx.core.impl.AddressResolver.NDOTS_OPTIONS_PATTERN:Ljava/util/regex/Pattern;
2: ldc "rotate"
invokestatic io.vertx.core.impl.AddressResolver.resolvOption:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic io.vertx.core.impl.AddressResolver.ROTATE_OPTIONS_PATTERN:Ljava/util/regex/Pattern;
3: iconst_1
istore 0
start local 0 4: iconst_0
istore 1
start local 1 5: invokestatic io.vertx.core.impl.launcher.commands.ExecUtils.isLinux:()Z
ifeq 16
6: new java.io.File
dup
ldc "/etc/resolv.conf"
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 2
start local 2 7: aload 2
invokevirtual java.io.File.exists:()Z
ifeq 16
aload 2
invokevirtual java.io.File.isFile:()Z
ifeq 16
8: new java.lang.String
dup
aload 2
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
invokestatic java.nio.file.Files.readAllBytes:(Ljava/nio/file/Path;)[B
invokespecial java.lang.String.<init>:([B)V
astore 3
start local 3 9: aload 3
invokestatic io.vertx.core.impl.AddressResolver.parseNdotsOptionFromResolvConf:(Ljava/lang/String;)I
istore 4
start local 4 10: iload 4
iconst_m1
if_icmpeq 12
11: iload 4
istore 0
12: StackMap locals: int int java.io.File java.lang.String int
StackMap stack:
aload 3
invokestatic io.vertx.core.impl.AddressResolver.parseRotateOptionFromResolvConf:(Ljava/lang/String;)Z
istore 1
end local 4 end local 3 13: goto 16
StackMap locals: int int java.io.File
StackMap stack: java.lang.Throwable
14: astore 3
start local 3 15: getstatic io.vertx.core.impl.AddressResolver.log:Lio/vertx/core/impl/logging/Logger;
ldc "Failed to load options from /etc/resolv/.conf"
aload 3
invokeinterface io.vertx.core.impl.logging.Logger.debug:(Ljava/lang/Object;Ljava/lang/Throwable;)V
end local 3 end local 2 16: StackMap locals:
StackMap stack:
iload 0
putstatic io.vertx.core.impl.AddressResolver.DEFAULT_NDOTS_RESOLV_OPTION:I
17: iload 1
putstatic io.vertx.core.impl.AddressResolver.DEFAULT_ROTATE_RESOLV_OPTION:Z
end local 1 end local 0 18: return
LocalVariableTable:
Start End Slot Name Signature
4 18 0 ndots I
5 18 1 rotate Z
7 16 2 f Ljava/io/File;
9 13 3 conf Ljava/lang/String;
10 13 4 ndotsOption I
15 16 3 t Ljava/lang/Throwable;
Exception table:
from to target type
7 13 14 Class java.lang.Throwable
private static java.util.regex.Pattern resolvOption(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/util/regex/Pattern;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
ldc "^[ \\t\\f]*options[^\n]+"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "(?=$|\\s)"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
bipush 8
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;I)Ljava/util/regex/Pattern;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 regex Ljava/lang/String;
MethodParameters:
Name Flags
regex
public void <init>(io.vertx.core.Vertx, io.vertx.core.dns.AddressResolverOptions);
descriptor: (Lio/vertx/core/Vertx;Lio/vertx/core/dns/AddressResolverOptions;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
aload 2
invokestatic io.vertx.core.spi.resolver.ResolverProvider.factory:(Lio/vertx/core/Vertx;Lio/vertx/core/dns/AddressResolverOptions;)Lio/vertx/core/spi/resolver/ResolverProvider;
putfield io.vertx.core.impl.AddressResolver.provider:Lio/vertx/core/spi/resolver/ResolverProvider;
2: aload 0
aload 0
getfield io.vertx.core.impl.AddressResolver.provider:Lio/vertx/core/spi/resolver/ResolverProvider;
aload 2
invokeinterface io.vertx.core.spi.resolver.ResolverProvider.resolver:(Lio/vertx/core/dns/AddressResolverOptions;)Lio/netty/resolver/AddressResolverGroup;
putfield io.vertx.core.impl.AddressResolver.resolverGroup:Lio/netty/resolver/AddressResolverGroup;
3: aload 0
aload 1
putfield io.vertx.core.impl.AddressResolver.vertx:Lio/vertx/core/Vertx;
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/vertx/core/impl/AddressResolver;
0 5 1 vertx Lio/vertx/core/Vertx;
0 5 2 options Lio/vertx/core/dns/AddressResolverOptions;
MethodParameters:
Name Flags
vertx
options
public void resolveHostname(java.lang.String, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.net.InetAddress>>);
descriptor: (Ljava/lang/String;Lio/vertx/core/Handler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield io.vertx.core.impl.AddressResolver.vertx:Lio/vertx/core/Vertx;
invokeinterface io.vertx.core.Vertx.getOrCreateContext:()Lio/vertx/core/Context;
checkcast io.vertx.core.impl.ContextInternal
astore 3
start local 3 1: aload 0
aload 3
invokeinterface io.vertx.core.impl.ContextInternal.nettyEventLoop:()Lio/netty/channel/EventLoop;
aload 1
invokevirtual io.vertx.core.impl.AddressResolver.resolveHostname:(Lio/netty/channel/EventLoop;Ljava/lang/String;)Lio/netty/util/concurrent/Future;
astore 4
start local 4 2: aload 3
invokeinterface io.vertx.core.impl.ContextInternal.promise:()Lio/vertx/core/impl/future/PromiseInternal;
astore 5
start local 5 3: aload 4
aload 5
invokeinterface io.netty.util.concurrent.Future.addListener:(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/util/concurrent/Future;
pop
4: aload 5
invokeinterface io.vertx.core.impl.future.PromiseInternal.future:()Lio/vertx/core/Future;
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
java/net/InetSocketAddress.getAddress()Ljava/net/InetAddress; (5)
(Ljava/net/InetSocketAddress;)Ljava/net/InetAddress;
invokeinterface io.vertx.core.Future.map:(Ljava/util/function/Function;)Lio/vertx/core/Future;
aload 2
invokeinterface io.vertx.core.Future.onComplete:(Lio/vertx/core/Handler;)Lio/vertx/core/Future;
pop
5: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lio/vertx/core/impl/AddressResolver;
0 6 1 hostname Ljava/lang/String;
0 6 2 resultHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Ljava/net/InetAddress;>;>;
1 6 3 context Lio/vertx/core/impl/ContextInternal;
2 6 4 fut Lio/netty/util/concurrent/Future<Ljava/net/InetSocketAddress;>;
3 6 5 promise Lio/vertx/core/impl/future/PromiseInternal<Ljava/net/InetSocketAddress;>;
Signature: (Ljava/lang/String;Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Ljava/net/InetAddress;>;>;)V
MethodParameters:
Name Flags
hostname
resultHandler
public io.netty.util.concurrent.Future<java.net.InetSocketAddress> resolveHostname(io.netty.channel.EventLoop, java.lang.String);
descriptor: (Lio/netty/channel/EventLoop;Ljava/lang/String;)Lio/netty/util/concurrent/Future;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield io.vertx.core.impl.AddressResolver.resolverGroup:Lio/netty/resolver/AddressResolverGroup;
aload 1
invokevirtual io.netty.resolver.AddressResolverGroup.getResolver:(Lio/netty/util/concurrent/EventExecutor;)Lio/netty/resolver/AddressResolver;
astore 3
start local 3 1: aload 3
aload 2
iconst_0
invokestatic java.net.InetSocketAddress.createUnresolved:(Ljava/lang/String;I)Ljava/net/InetSocketAddress;
invokeinterface io.netty.resolver.AddressResolver.resolve:(Ljava/net/SocketAddress;)Lio/netty/util/concurrent/Future;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/core/impl/AddressResolver;
0 2 1 eventLoop Lio/netty/channel/EventLoop;
0 2 2 hostname Ljava/lang/String;
1 2 3 resolver Lio/netty/resolver/AddressResolver<Ljava/net/InetSocketAddress;>;
Signature: (Lio/netty/channel/EventLoop;Ljava/lang/String;)Lio/netty/util/concurrent/Future<Ljava/net/InetSocketAddress;>;
MethodParameters:
Name Flags
eventLoop
hostname
io.netty.resolver.AddressResolverGroup<java.net.InetSocketAddress> nettyAddressResolverGroup();
descriptor: ()Lio/netty/resolver/AddressResolverGroup;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.vertx.core.impl.AddressResolver.resolverGroup:Lio/netty/resolver/AddressResolverGroup;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/vertx/core/impl/AddressResolver;
Signature: ()Lio/netty/resolver/AddressResolverGroup<Ljava/net/InetSocketAddress;>;
public void close(io.vertx.core.Handler<java.lang.Void>);
descriptor: (Lio/vertx/core/Handler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.vertx.core.impl.AddressResolver.provider:Lio/vertx/core/spi/resolver/ResolverProvider;
aload 1
invokeinterface io.vertx.core.spi.resolver.ResolverProvider.close:(Lio/vertx/core/Handler;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/core/impl/AddressResolver;
0 2 1 doneHandler Lio/vertx/core/Handler<Ljava/lang/Void;>;
Signature: (Lio/vertx/core/Handler<Ljava/lang/Void;>;)V
MethodParameters:
Name Flags
doneHandler
public static int parseNdotsOptionFromResolvConf(java.lang.String);
descriptor: (Ljava/lang/String;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: iconst_m1
istore 1
start local 1 1: getstatic io.vertx.core.impl.AddressResolver.NDOTS_OPTIONS_PATTERN:Ljava/util/regex/Pattern;
aload 0
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 2
start local 2 2: goto 4
3: StackMap locals: int java.util.regex.Matcher
StackMap stack:
aload 2
iconst_1
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 1
4: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.util.regex.Matcher.find:()Z
ifne 3
5: iload 1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 s Ljava/lang/String;
1 6 1 ndots I
2 6 2 matcher Ljava/util/regex/Matcher;
MethodParameters:
Name Flags
s
public static boolean parseRotateOptionFromResolvConf(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: getstatic io.vertx.core.impl.AddressResolver.ROTATE_OPTIONS_PATTERN:Ljava/util/regex/Pattern;
aload 0
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 1
start local 1 1: aload 1
invokevirtual java.util.regex.Matcher.find:()Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 s Ljava/lang/String;
1 2 1 matcher Ljava/util/regex/Matcher;
MethodParameters:
Name Flags
s
}
SourceFile: "AddressResolver.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles