public class org.apache.activemq.console.command.ShutdownCommand extends org.apache.activemq.console.command.AbstractJmxCommand
{
protected java.lang.String[] helpFile;
private boolean isStopAllBrokers;
public void <init>()
{
java.lang.String[] v;
org.apache.activemq.console.command.ShutdownCommand v;
v := @this: org.apache.activemq.console.command.ShutdownCommand;
specialinvoke v.<org.apache.activemq.console.command.AbstractJmxCommand: void <init>()>();
v = newarray (java.lang.String)[18];
v[0] = "Task Usage: Main stop [stop-options] [broker-name] [broker-name] ...";
v[1] = "Description: Stops a running broker.";
v[2] = "";
v[3] = "Stop Options:";
v[4] = "    --jmxurl <url>             Set the JMX URL to connect to.";
v[5] = "    --pid <pid>                   Set the pid to connect to (only on Sun JVM).";
v[6] = "    --jmxuser <user>           Set the JMX user used for authenticating.";
v[7] = "    --jmxpassword <password>   Set the JMX password used for authenticating.";
v[8] = "    --jmxlocal                 Use the local JMX server instead of a remote one.";
v[9] = "    --all                      Stop all brokers.";
v[10] = "    --version                  Display the version information.";
v[11] = "    -h,-?,--help               Display the stop broker help information.";
v[12] = "";
v[13] = "Broker Names:";
v[14] = "    Name of the brokers that will be stopped.";
v[15] = "    If omitted, it is assumed that there is only one broker running, and it will be stopped.";
v[16] = "    Use -all to stop all running brokers.";
v[17] = "";
v.<org.apache.activemq.console.command.ShutdownCommand: java.lang.String[] helpFile> = v;
return;
}
public java.lang.String getName()
{
org.apache.activemq.console.command.ShutdownCommand v;
v := @this: org.apache.activemq.console.command.ShutdownCommand;
return "stop";
}
public java.lang.String getOneLineDescription()
{
org.apache.activemq.console.command.ShutdownCommand v;
v := @this: org.apache.activemq.console.command.ShutdownCommand;
return "Stops a running broker specified by the broker name.";
}
protected void runTask(java.util.List) throws java.lang.Exception
{
java.util.HashSet v;
int v;
java.lang.String v;
boolean v, v, v, v, v;
javax.management.MBeanServerConnection v, v, v, v;
java.util.Iterator v;
org.apache.activemq.console.CommandContext v, v, v;
java.util.Collection v;
java.util.List v, v;
java.lang.Object v, v;
org.apache.activemq.console.command.ShutdownCommand v;
v := @this: org.apache.activemq.console.command.ShutdownCommand;
v := @parameter: java.util.List;
v = v.<org.apache.activemq.console.command.ShutdownCommand: boolean isStopAllBrokers>;
if v == 0 goto label;
v = virtualinvoke v.<org.apache.activemq.console.command.ShutdownCommand: javax.management.MBeanServerConnection createJmxConnection()>();
v = staticinvoke <org.apache.activemq.console.util.JmxMBeansUtil: java.util.List getAllBrokers(javax.management.MBeanServerConnection)>(v);
interfaceinvoke v.<java.util.List: void clear()>();
goto label;
label:
v = interfaceinvoke v.<java.util.List: boolean isEmpty()>();
if v == 0 goto label;
v = virtualinvoke v.<org.apache.activemq.console.command.ShutdownCommand: javax.management.MBeanServerConnection createJmxConnection()>();
v = staticinvoke <org.apache.activemq.console.util.JmxMBeansUtil: java.util.List getAllBrokers(javax.management.MBeanServerConnection)>(v);
v = interfaceinvoke v.<java.util.Collection: boolean isEmpty()>();
if v == 0 goto label;
v = v.<org.apache.activemq.console.command.ShutdownCommand: org.apache.activemq.console.CommandContext context>;
virtualinvoke v.<org.apache.activemq.console.CommandContext: void printInfo(java.lang.String)>("There are no brokers to stop.");
return;
label:
v = interfaceinvoke v.<java.util.Collection: int size()>();
if v <= 1 goto label;
v = v.<org.apache.activemq.console.command.ShutdownCommand: org.apache.activemq.console.CommandContext context>;
virtualinvoke v.<org.apache.activemq.console.CommandContext: void printInfo(java.lang.String)>("There are multiple brokers to stop. Please select the broker(s) to stop or use --all to stop all brokers.");
return;
label:
v = interfaceinvoke v.<java.util.Collection: java.util.Iterator iterator()>();
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
interfaceinvoke v.<java.util.Collection: void clear()>();
interfaceinvoke v.<java.util.Collection: boolean add(java.lang.Object)>(v);
goto label;
label:
v = new java.util.HashSet;
specialinvoke v.<java.util.HashSet: void <init>()>();
v = v;
label:
v = interfaceinvoke v.<java.util.List: boolean isEmpty()>();
if v != 0 goto label;
v = interfaceinvoke v.<java.util.List: java.lang.Object remove(int)>(0);
v = virtualinvoke v.<org.apache.activemq.console.command.ShutdownCommand: javax.management.MBeanServerConnection createJmxConnection()>();
v = staticinvoke <org.apache.activemq.console.util.JmxMBeansUtil: java.util.List getBrokersByName(javax.management.MBeanServerConnection,java.lang.String)>(v, v);
v = interfaceinvoke v.<java.util.Collection: boolean isEmpty()>();
if v == 0 goto label;
v = v.<org.apache.activemq.console.command.ShutdownCommand: org.apache.activemq.console.CommandContext context>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u did not match any running brokers.");
virtualinvoke v.<org.apache.activemq.console.CommandContext: void printInfo(java.lang.String)>(v);
goto label;
label:
interfaceinvoke v.<java.util.Collection: boolean addAll(java.util.Collection)>(v);
goto label;
label:
v = virtualinvoke v.<org.apache.activemq.console.command.ShutdownCommand: javax.management.MBeanServerConnection createJmxConnection()>();
virtualinvoke v.<org.apache.activemq.console.command.ShutdownCommand: void stopBrokers(javax.management.MBeanServerConnection,java.util.Collection)>(v, v);
return;
}
protected void stopBrokers(javax.management.MBeanServerConnection, java.util.Collection) throws java.lang.Exception
{
java.lang.Object[] v;
java.lang.String[] v;
java.lang.Integer v;
java.lang.String v, v, v;
boolean v;
javax.management.MBeanServerConnection v;
java.util.Iterator v;
org.apache.activemq.console.CommandContext v, v;
java.util.Collection v;
javax.management.ObjectName v;
java.lang.Exception v;
java.lang.Object v;
org.apache.activemq.console.command.ShutdownCommand v;
v := @this: org.apache.activemq.console.command.ShutdownCommand;
v := @parameter: javax.management.MBeanServerConnection;
v := @parameter: java.util.Collection;
v = interfaceinvoke v.<java.util.Collection: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<javax.management.ObjectInstance: javax.management.ObjectName getObjectName()>();
v = virtualinvoke v.<javax.management.ObjectName: java.lang.String getKeyProperty(java.lang.String)>("brokerName");
v = v.<org.apache.activemq.console.command.ShutdownCommand: org.apache.activemq.console.CommandContext context>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Stopping broker: \u0001");
virtualinvoke v.<org.apache.activemq.console.CommandContext: void print(java.lang.String)>(v);
label:
v = newarray (java.lang.Object)[1];
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(0);
v[0] = v;
v = newarray (java.lang.String)[1];
v[0] = "int";
interfaceinvoke v.<javax.management.MBeanServerConnection: java.lang.Object invoke(javax.management.ObjectName,java.lang.String,java.lang.Object[],java.lang.String[])>(v, "terminateJVM", v, v);
v = v.<org.apache.activemq.console.command.ShutdownCommand: org.apache.activemq.console.CommandContext context>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Succesfully stopped broker: \u0001");
virtualinvoke v.<org.apache.activemq.console.CommandContext: void print(java.lang.String)>(v);
label:
goto label;
label:
v := @caughtexception;
goto label;
label:
virtualinvoke v.<org.apache.activemq.console.command.ShutdownCommand: void closeJmxConnection()>();
return;
catch java.lang.Exception from label to label with label;
}
protected void handleOption(java.lang.String, java.util.List) throws java.lang.Exception
{
java.util.List v;
java.lang.String v;
boolean v;
org.apache.activemq.console.command.ShutdownCommand v;
v := @this: org.apache.activemq.console.command.ShutdownCommand;
v := @parameter: java.lang.String;
v := @parameter: java.util.List;
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>("--all");
if v == 0 goto label;
v.<org.apache.activemq.console.command.ShutdownCommand: boolean isStopAllBrokers> = 1;
goto label;
label:
specialinvoke v.<org.apache.activemq.console.command.AbstractJmxCommand: void handleOption(java.lang.String,java.util.List)>(v, v);
label:
return;
}
protected void printHelp()
{
java.lang.String[] v;
org.apache.activemq.console.CommandContext v;
org.apache.activemq.console.command.ShutdownCommand v;
v := @this: org.apache.activemq.console.command.ShutdownCommand;
v = v.<org.apache.activemq.console.command.ShutdownCommand: org.apache.activemq.console.CommandContext context>;
v = v.<org.apache.activemq.console.command.ShutdownCommand: java.lang.String[] helpFile>;
virtualinvoke v.<org.apache.activemq.console.CommandContext: void printHelp(java.lang.String[])>(v);
return;
}
}