public class io.dropwizard.setup.AdminEnvironment extends io.dropwizard.jetty.setup.ServletEnvironment
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.dropwizard.setup.AdminEnvironment
super_class: io.dropwizard.jetty.setup.ServletEnvironment
{
private static final org.slf4j.Logger LOGGER;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final com.codahale.metrics.health.HealthCheckRegistry healthChecks;
descriptor: Lcom/codahale/metrics/health/HealthCheckRegistry;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final io.dropwizard.servlets.tasks.TaskServlet tasks;
descriptor: Lio/dropwizard/servlets/tasks/TaskServlet;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lio/dropwizard/setup/AdminEnvironment;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic io.dropwizard.setup.AdminEnvironment.LOGGER:Lorg/slf4j/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(io.dropwizard.jetty.MutableServletContextHandler, com.codahale.metrics.health.HealthCheckRegistry, com.codahale.metrics.MetricRegistry, io.dropwizard.setup.AdminFactory);
descriptor: (Lio/dropwizard/jetty/MutableServletContextHandler;Lcom/codahale/metrics/health/HealthCheckRegistry;Lcom/codahale/metrics/MetricRegistry;Lio/dropwizard/setup/AdminFactory;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
aload 1
invokespecial io.dropwizard.jetty.setup.ServletEnvironment.<init>:(Lio/dropwizard/jetty/MutableServletContextHandler;)V
1: aload 0
aload 2
putfield io.dropwizard.setup.AdminEnvironment.healthChecks:Lcom/codahale/metrics/health/HealthCheckRegistry;
2: aload 0
getfield io.dropwizard.setup.AdminEnvironment.healthChecks:Lcom/codahale/metrics/health/HealthCheckRegistry;
ldc "deadlocks"
new com.codahale.metrics.health.jvm.ThreadDeadlockHealthCheck
dup
invokespecial com.codahale.metrics.health.jvm.ThreadDeadlockHealthCheck.<init>:()V
invokevirtual com.codahale.metrics.health.HealthCheckRegistry.register:(Ljava/lang/String;Lcom/codahale/metrics/health/HealthCheck;)V
3: aload 0
new io.dropwizard.servlets.tasks.TaskServlet
dup
aload 3
aload 4
invokevirtual io.dropwizard.setup.AdminFactory.getTasks:()Lio/dropwizard/servlets/tasks/TaskConfiguration;
invokespecial io.dropwizard.servlets.tasks.TaskServlet.<init>:(Lcom/codahale/metrics/MetricRegistry;Lio/dropwizard/servlets/tasks/TaskConfiguration;)V
putfield io.dropwizard.setup.AdminEnvironment.tasks:Lio/dropwizard/servlets/tasks/TaskServlet;
4: aload 0
getfield io.dropwizard.setup.AdminEnvironment.tasks:Lio/dropwizard/servlets/tasks/TaskServlet;
new io.dropwizard.servlets.tasks.GarbageCollectionTask
dup
invokespecial io.dropwizard.servlets.tasks.GarbageCollectionTask.<init>:()V
invokevirtual io.dropwizard.servlets.tasks.TaskServlet.add:(Lio/dropwizard/servlets/tasks/Task;)V
5: aload 0
getfield io.dropwizard.setup.AdminEnvironment.tasks:Lio/dropwizard/servlets/tasks/TaskServlet;
new io.dropwizard.servlets.tasks.LogConfigurationTask
dup
invokespecial io.dropwizard.servlets.tasks.LogConfigurationTask.<init>:()V
invokevirtual io.dropwizard.servlets.tasks.TaskServlet.add:(Lio/dropwizard/servlets/tasks/Task;)V
6: aload 0
ldc "tasks"
aload 0
getfield io.dropwizard.setup.AdminEnvironment.tasks:Lio/dropwizard/servlets/tasks/TaskServlet;
invokevirtual io.dropwizard.setup.AdminEnvironment.addServlet:(Ljava/lang/String;Ljavax/servlet/Servlet;)Ljavax/servlet/ServletRegistration$Dynamic;
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "/tasks/*"
aastore
invokeinterface javax.servlet.ServletRegistration$Dynamic.addMapping:([Ljava/lang/String;)Ljava/util/Set;
pop
7: aload 1
new io.dropwizard.setup.AdminEnvironment$1
dup
aload 0
invokespecial io.dropwizard.setup.AdminEnvironment$1.<init>:(Lio/dropwizard/setup/AdminEnvironment;)V
invokevirtual io.dropwizard.jetty.MutableServletContextHandler.addLifeCycleListener:(Lorg/eclipse/jetty/util/component/LifeCycle$Listener;)V
8: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lio/dropwizard/setup/AdminEnvironment;
0 9 1 handler Lio/dropwizard/jetty/MutableServletContextHandler;
0 9 2 healthChecks Lcom/codahale/metrics/health/HealthCheckRegistry;
0 9 3 metricRegistry Lcom/codahale/metrics/MetricRegistry;
0 9 4 adminFactory Lio/dropwizard/setup/AdminFactory;
MethodParameters:
Name Flags
handler
healthChecks
metricRegistry
adminFactory
public void addTask(io.dropwizard.servlets.tasks.Task);
descriptor: (Lio/dropwizard/servlets/tasks/Task;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.dropwizard.setup.AdminEnvironment.tasks:Lio/dropwizard/servlets/tasks/TaskServlet;
aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast io.dropwizard.servlets.tasks.Task
invokevirtual io.dropwizard.servlets.tasks.TaskServlet.add:(Lio/dropwizard/servlets/tasks/Task;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/dropwizard/setup/AdminEnvironment;
0 2 1 task Lio/dropwizard/servlets/tasks/Task;
MethodParameters:
Name Flags
task
private void logTasks();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
sipush 1024
invokespecial java.lang.StringBuilder.<init>:(I)V
ldc "%n%n"
iconst_0
anewarray java.lang.Object
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
astore 1
start local 1 1: aload 0
getfield io.dropwizard.setup.AdminEnvironment.tasks:Lio/dropwizard/servlets/tasks/TaskServlet;
invokevirtual io.dropwizard.servlets.tasks.TaskServlet.getTasks:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 3
goto 9
StackMap locals: io.dropwizard.setup.AdminEnvironment java.lang.StringBuilder top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.dropwizard.servlets.tasks.Task
astore 2
start local 2 3: aload 2
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getCanonicalName:()Ljava/lang/String;
aload 2
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokestatic io.dropwizard.setup.AdminEnvironment.firstNonNull:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 4: aload 1
ldc " %-7s /tasks/%s (%s)%n"
iconst_3
anewarray java.lang.Object
dup
iconst_0
5: ldc "POST"
aastore
dup
iconst_1
6: aload 2
invokevirtual io.dropwizard.servlets.tasks.Task.getName:()Ljava/lang/String;
aastore
dup
iconst_2
7: aload 4
aastore
8: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
end local 4 end local 2 9: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
10: getstatic io.dropwizard.setup.AdminEnvironment.LOGGER:Lorg/slf4j/Logger;
ldc "tasks = {}"
aload 1
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;)V
11: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lio/dropwizard/setup/AdminEnvironment;
1 12 1 stringBuilder Ljava/lang/StringBuilder;
3 9 2 task Lio/dropwizard/servlets/tasks/Task;
4 9 4 taskClassName Ljava/lang/String;
private static <T> T firstNonNull(T, );
descriptor: (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
ifnonnull 1
aload 1
goto 2
StackMap locals:
StackMap stack:
1: aload 0
StackMap locals:
StackMap stack: java.lang.Object
2: areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 first TT;
0 3 1 second TT;
Signature: <T:Ljava/lang/Object;>(TT;TT;)TT;
MethodParameters:
Name Flags
first
second
private void logHealthChecks();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.setup.AdminEnvironment.healthChecks:Lcom/codahale/metrics/health/HealthCheckRegistry;
invokevirtual com.codahale.metrics.health.HealthCheckRegistry.getNames:()Ljava/util/SortedSet;
invokeinterface java.util.SortedSet.size:()I
iconst_1
if_icmpgt 4
1: getstatic io.dropwizard.setup.AdminEnvironment.LOGGER:Lorg/slf4j/Logger;
2: ldc "%n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%n! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW !%n! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE !%n! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR !%n! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. !%n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
iconst_0
anewarray java.lang.Object
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
4: StackMap locals:
StackMap stack:
getstatic io.dropwizard.setup.AdminEnvironment.LOGGER:Lorg/slf4j/Logger;
ldc "health checks = {}"
aload 0
getfield io.dropwizard.setup.AdminEnvironment.healthChecks:Lcom/codahale/metrics/health/HealthCheckRegistry;
invokevirtual com.codahale.metrics.health.HealthCheckRegistry.getNames:()Ljava/util/SortedSet;
invokeinterface org.slf4j.Logger.debug:(Ljava/lang/String;Ljava/lang/Object;)V
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lio/dropwizard/setup/AdminEnvironment;
}
SourceFile: "AdminEnvironment.java"
NestMembers:
io.dropwizard.setup.AdminEnvironment$1
InnerClasses:
io.dropwizard.setup.AdminEnvironment$1
public abstract Dynamic = javax.servlet.ServletRegistration$Dynamic of javax.servlet.ServletRegistration
public abstract Listener = org.eclipse.jetty.util.component.LifeCycle$Listener of org.eclipse.jetty.util.component.LifeCycle