public class com.sun.jmx.snmp.tasks.ThreadService implements com.sun.jmx.snmp.tasks.TaskServer
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.sun.jmx.snmp.tasks.ThreadService
super_class: java.lang.Object
{
private java.util.ArrayList<java.lang.Runnable> jobList;
descriptor: Ljava/util/ArrayList;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/ArrayList<Ljava/lang/Runnable;>;
private com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread[] threadList;
descriptor: [Lcom/sun/jmx/snmp/tasks/ThreadService$ExecutorThread;
flags: (0x0002) ACC_PRIVATE
private int minThreads;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int currThreds;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int idle;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean terminated;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private int priority;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private java.lang.ThreadGroup threadGroup;
descriptor: Ljava/lang/ThreadGroup;
flags: (0x0002) ACC_PRIVATE
private java.lang.ClassLoader cloader;
descriptor: Ljava/lang/ClassLoader;
flags: (0x0002) ACC_PRIVATE
private static long counter;
descriptor: J
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private int addedJobs;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int doneJobs;
descriptor: I
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: lconst_0
putstatic com.sun.jmx.snmp.tasks.ThreadService.counter:J
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.ArrayList
dup
iconst_0
invokespecial java.util.ArrayList.<init>:(I)V
putfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
2: aload 0
iconst_1
putfield com.sun.jmx.snmp.tasks.ThreadService.minThreads:I
3: aload 0
iconst_0
putfield com.sun.jmx.snmp.tasks.ThreadService.currThreds:I
4: aload 0
iconst_0
putfield com.sun.jmx.snmp.tasks.ThreadService.idle:I
5: aload 0
iconst_0
putfield com.sun.jmx.snmp.tasks.ThreadService.terminated:Z
6: aload 0
new java.lang.ThreadGroup
dup
ldc "ThreadService"
invokespecial java.lang.ThreadGroup.<init>:(Ljava/lang/String;)V
putfield com.sun.jmx.snmp.tasks.ThreadService.threadGroup:Ljava/lang/ThreadGroup;
7: aload 0
iconst_1
putfield com.sun.jmx.snmp.tasks.ThreadService.addedJobs:I
8: aload 0
iconst_1
putfield com.sun.jmx.snmp.tasks.ThreadService.doneJobs:I
9: iload 1
ifgt 11
10: new java.lang.IllegalArgumentException
dup
ldc "The thread number should bigger than zero."
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals: com.sun.jmx.snmp.tasks.ThreadService int
StackMap stack:
aload 0
iload 1
putfield com.sun.jmx.snmp.tasks.ThreadService.minThreads:I
12: aload 0
iload 1
anewarray com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread
putfield com.sun.jmx.snmp.tasks.ThreadService.threadList:[Lcom/sun/jmx/snmp/tasks/ThreadService$ExecutorThread;
13: aload 0
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.getPriority:()I
putfield com.sun.jmx.snmp.tasks.ThreadService.priority:I
14: aload 0
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.getContextClassLoader:()Ljava/lang/ClassLoader;
putfield com.sun.jmx.snmp.tasks.ThreadService.cloader:Ljava/lang/ClassLoader;
15: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
0 16 1 threadNumber I
MethodParameters:
Name Flags
threadNumber
public void submitTask(com.sun.jmx.snmp.tasks.Task);
descriptor: (Lcom/sun/jmx/snmp/tasks/Task;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual com.sun.jmx.snmp.tasks.ThreadService.submitTask:(Ljava/lang/Runnable;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
0 2 1 task Lcom/sun/jmx/snmp/tasks/Task;
Exceptions:
throws java.lang.IllegalArgumentException
MethodParameters:
Name Flags
task
public void submitTask(java.lang.Runnable);
descriptor: (Ljava/lang/Runnable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.sun.jmx.snmp.tasks.ThreadService.stateCheck:()V
1: aload 1
ifnonnull 3
2: new java.lang.IllegalArgumentException
dup
ldc "No task specified."
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
dup
astore 2
monitorenter
4: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.size:()I
aload 1
invokevirtual java.util.ArrayList.add:(ILjava/lang/Object;)V
5: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
invokevirtual java.lang.Object.notify:()V
6: aload 2
monitorexit
7: goto 10
StackMap locals: com.sun.jmx.snmp.tasks.ThreadService java.lang.Runnable java.util.ArrayList
StackMap stack: java.lang.Throwable
8: aload 2
monitorexit
9: athrow
10: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.jmx.snmp.tasks.ThreadService.createThread:()V
11: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
0 12 1 task Ljava/lang/Runnable;
Exception table:
from to target type
4 7 8 any
8 9 8 any
Exceptions:
throws java.lang.IllegalArgumentException
MethodParameters:
Name Flags
task
public java.lang.Runnable removeTask(java.lang.Runnable);
descriptor: (Ljava/lang/Runnable;)Ljava/lang/Runnable;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.sun.jmx.snmp.tasks.ThreadService.stateCheck:()V
1: aconst_null
astore 2
start local 2 2: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
dup
astore 3
monitorenter
3: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
aload 1
invokevirtual java.util.ArrayList.indexOf:(Ljava/lang/Object;)I
istore 4
start local 4 4: iload 4
iflt 6
5: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
iload 4
invokevirtual java.util.ArrayList.remove:(I)Ljava/lang/Object;
checkcast java.lang.Runnable
astore 2
end local 4 6: StackMap locals: java.lang.Runnable java.util.ArrayList
StackMap stack:
aload 3
monitorexit
7: goto 10
StackMap locals:
StackMap stack: java.lang.Throwable
8: aload 3
monitorexit
9: athrow
10: StackMap locals:
StackMap stack:
aload 2
ifnull 12
aload 2
instanceof com.sun.jmx.snmp.tasks.Task
ifeq 12
11: aload 2
checkcast com.sun.jmx.snmp.tasks.Task
invokeinterface com.sun.jmx.snmp.tasks.Task.cancel:()V
12: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
0 13 1 task Ljava/lang/Runnable;
2 13 2 removed Ljava/lang/Runnable;
4 6 4 lg I
Exception table:
from to target type
3 7 8 any
8 9 8 any
MethodParameters:
Name Flags
task
public void removeAll();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=5, args_size=1
start local 0 0: aload 0
invokevirtual com.sun.jmx.snmp.tasks.ThreadService.stateCheck:()V
1: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
dup
astore 2
monitorenter
2: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.toArray:()[Ljava/lang/Object;
astore 1
start local 1 3: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.clear:()V
4: aload 2
monitorexit
5: goto 8
end local 1 StackMap locals: com.sun.jmx.snmp.tasks.ThreadService top java.util.ArrayList
StackMap stack: java.lang.Throwable
6: aload 2
monitorexit
7: athrow
start local 1 8: StackMap locals: com.sun.jmx.snmp.tasks.ThreadService java.lang.Object[]
StackMap stack:
aload 1
arraylength
istore 2
start local 2 9: iconst_0
istore 3
start local 3 10: goto 14
11: StackMap locals: int int
StackMap stack:
aload 1
iload 3
aaload
astore 4
start local 4 12: aload 4
ifnull 13
aload 4
instanceof com.sun.jmx.snmp.tasks.Task
ifeq 13
aload 4
checkcast com.sun.jmx.snmp.tasks.Task
invokeinterface com.sun.jmx.snmp.tasks.Task.cancel:()V
end local 4 13: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
14: iload 3
iload 2
if_icmplt 11
end local 3 15: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
3 6 1 jobs [Ljava/lang/Object;
8 16 1 jobs [Ljava/lang/Object;
9 16 2 len I
10 15 3 i I
12 13 4 o Ljava/lang/Object;
Exception table:
from to target type
2 5 6 any
6 7 6 any
public void terminate();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.terminated:Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield com.sun.jmx.snmp.tasks.ThreadService.terminated:Z
3: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
dup
astore 1
monitorenter
4: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
invokevirtual java.lang.Object.notifyAll:()V
5: aload 1
monitorexit
6: goto 9
StackMap locals: com.sun.jmx.snmp.tasks.ThreadService java.util.ArrayList
StackMap stack: java.lang.Throwable
7: aload 1
monitorexit
8: athrow
9: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.jmx.snmp.tasks.ThreadService.removeAll:()V
10: iconst_0
istore 1
start local 1 11: goto 16
12: StackMap locals: int
StackMap stack:
aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.threadList:[Lcom/sun/jmx/snmp/tasks/ThreadService$ExecutorThread;
iload 1
aaload
invokevirtual com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread.interrupt:()V
13: goto 15
StackMap locals:
StackMap stack: java.lang.Exception
14: pop
15: StackMap locals:
StackMap stack:
iinc 1 1
StackMap locals:
StackMap stack:
16: iload 1
aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.currThreds:I
if_icmplt 12
end local 1 17: aload 0
aconst_null
putfield com.sun.jmx.snmp.tasks.ThreadService.threadList:[Lcom/sun/jmx/snmp/tasks/ThreadService$ExecutorThread;
18: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
11 17 1 i I
Exception table:
from to target type
4 6 7 any
7 8 7 any
12 13 14 Class java.lang.Exception
private void stateCheck();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.terminated:Z
ifeq 2
1: new java.lang.IllegalStateException
dup
ldc "The thread service has been terminated."
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
Exceptions:
throws java.lang.IllegalStateException
private void createThread();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=1
start local 0 0: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.idle:I
iconst_1
if_icmpge 10
1: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.threadList:[Lcom/sun/jmx/snmp/tasks/ThreadService$ExecutorThread;
dup
astore 1
monitorenter
2: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.jobList:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.size:()I
ifle 6
aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.currThreds:I
aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.minThreads:I
if_icmpge 6
3: new com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread
dup
aload 0
invokespecial com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread.<init>:(Lcom/sun/jmx/snmp/tasks/ThreadService;)V
astore 2
start local 2 4: aload 2
invokevirtual com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread.start:()V
5: aload 0
getfield com.sun.jmx.snmp.tasks.ThreadService.threadList:[Lcom/sun/jmx/snmp/tasks/ThreadService$ExecutorThread;
aload 0
dup
getfield com.sun.jmx.snmp.tasks.ThreadService.currThreds:I
dup_x1
iconst_1
iadd
putfield com.sun.jmx.snmp.tasks.ThreadService.currThreds:I
aload 2
aastore
end local 2 6: StackMap locals: com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread[]
StackMap stack:
aload 1
monitorexit
7: goto 10
StackMap locals:
StackMap stack: java.lang.Throwable
8: aload 1
monitorexit
9: athrow
10: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/sun/jmx/snmp/tasks/ThreadService;
4 6 2 et Lcom/sun/jmx/snmp/tasks/ThreadService$ExecutorThread;
Exception table:
from to target type
2 7 8 any
8 9 8 any
}
SourceFile: "ThreadService.java"
NestMembers:
com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread
InnerClasses:
private ExecutorThread = com.sun.jmx.snmp.tasks.ThreadService$ExecutorThread of com.sun.jmx.snmp.tasks.ThreadService