public class org.apache.activemq.web.RemoteJMXBrokerFacade extends org.apache.activemq.web.BrokerFacadeSupport
{
private static final transient org.slf4j.Logger LOG;
private java.lang.String brokerName;
private javax.management.remote.JMXConnector connector;
private org.apache.activemq.web.config.WebConsoleConfiguration configuration;
public void <init>()
{
org.apache.activemq.web.RemoteJMXBrokerFacade v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
specialinvoke v.<org.apache.activemq.web.BrokerFacadeSupport: void <init>()>();
return;
}
public void setBrokerName(java.lang.String)
{
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.String v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: java.lang.String;
v.<org.apache.activemq.web.RemoteJMXBrokerFacade: java.lang.String brokerName> = v;
return;
}
public org.apache.activemq.web.config.WebConsoleConfiguration getConfiguration()
{
org.apache.activemq.web.RemoteJMXBrokerFacade v;
org.apache.activemq.web.config.WebConsoleConfiguration v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.web.config.WebConsoleConfiguration configuration>;
return v;
}
public void setConfiguration(org.apache.activemq.web.config.WebConsoleConfiguration)
{
org.apache.activemq.web.RemoteJMXBrokerFacade v;
org.apache.activemq.web.config.WebConsoleConfiguration v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: org.apache.activemq.web.config.WebConsoleConfiguration;
v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.web.config.WebConsoleConfiguration configuration> = v;
return;
}
public void shutdown()
{
org.apache.activemq.web.RemoteJMXBrokerFacade v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: void closeConnection()>();
return;
}
public org.apache.activemq.broker.jmx.BrokerViewMBean getBrokerAdmin() throws java.lang.Exception
{
javax.management.MBeanServerConnection v;
java.util.Iterator v;
java.util.Set v;
java.io.IOException v;
int v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.Object v, v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.MBeanServerConnection getMBeanServerConnection()>();
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: java.util.Set findBrokers(javax.management.MBeanServerConnection)>(v);
v = interfaceinvoke v.<java.util.Set: int size()>();
if v != 0 goto label;
v = new java.io.IOException;
specialinvoke v.<java.io.IOException: void <init>(java.lang.String)>("No broker could be found in the JMX.");
throw v;
label:
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = staticinvoke <javax.management.MBeanServerInvocationHandler: java.lang.Object newProxyInstance(javax.management.MBeanServerConnection,javax.management.ObjectName,java.lang.Class,boolean)>(v, v, class "Lorg/apache/activemq/broker/jmx/BrokerViewMBean;", 1);
return v;
}
public java.lang.String getBrokerName() throws java.lang.Exception, javax.management.MalformedObjectNameException
{
org.apache.activemq.web.RemoteJMXBrokerFacade v;
org.apache.activemq.broker.jmx.BrokerViewMBean v;
java.lang.String v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.broker.jmx.BrokerViewMBean getBrokerAdmin()>();
v = interfaceinvoke v.<org.apache.activemq.broker.jmx.BrokerViewMBean: java.lang.String getBrokerName()>();
return v;
}
protected javax.management.MBeanServerConnection getMBeanServerConnection() throws java.lang.Exception
{
java.lang.Throwable v;
javax.management.MBeanServerConnection v, v;
org.slf4j.Logger v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
javax.management.remote.JMXConnector v, v, v;
boolean v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.remote.JMXConnector connector>;
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: boolean isConnectionActive(javax.management.remote.JMXConnector)>(v);
if v == 0 goto label;
v = interfaceinvoke v.<javax.management.remote.JMXConnector: javax.management.MBeanServerConnection getMBeanServerConnection()>();
return v;
label:
entermonitor v;
label:
virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: void closeConnection()>();
v = <org.apache.activemq.web.RemoteJMXBrokerFacade: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>("Creating a new JMX-Connection to the broker");
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.remote.JMXConnector createConnection()>();
v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.remote.JMXConnector connector> = v;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.remote.JMXConnector connector>;
v = interfaceinvoke v.<javax.management.remote.JMXConnector: javax.management.MBeanServerConnection getMBeanServerConnection()>();
exitmonitor v;
label:
return v;
label:
v := @caughtexception;
exitmonitor v;
throw v;
catch java.lang.Throwable from label to label with label;
}
protected boolean isConnectionActive(javax.management.remote.JMXConnector)
{
javax.management.MBeanServerConnection v;
int v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.util.Set v;
javax.management.remote.JMXConnector v;
java.lang.Exception v;
boolean v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: javax.management.remote.JMXConnector;
if v != null goto label;
return 0;
label:
v = interfaceinvoke v.<javax.management.remote.JMXConnector: javax.management.MBeanServerConnection getMBeanServerConnection()>();
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: java.util.Set findBrokers(javax.management.MBeanServerConnection)>(v);
v = interfaceinvoke v.<java.util.Set: int size()>();
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
label:
v := @caughtexception;
return 0;
catch java.lang.Exception from label to label with label;
}
protected javax.management.remote.JMXConnector createConnection()
{
java.lang.IllegalStateException v;
java.lang.String[] v;
java.util.HashMap v;
int v, v;
java.lang.String v, v, v, v, v;
boolean v, v;
javax.management.MBeanServerConnection v;
org.slf4j.Logger v;
java.util.Iterator v;
java.util.Collection v;
org.apache.activemq.web.config.WebConsoleConfiguration v, v, v, v;
java.util.Set v;
java.lang.RuntimeException v;
java.lang.Exception v, v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.Object v;
javax.management.remote.JMXConnector v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v = new java.util.HashMap;
specialinvoke v.<java.util.HashMap: void <init>()>();
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.web.config.WebConsoleConfiguration configuration>;
v = interfaceinvoke v.<org.apache.activemq.web.config.WebConsoleConfiguration: java.lang.String getJmxUser()>();
if v == null goto label;
v = newarray (java.lang.String)[2];
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.web.config.WebConsoleConfiguration configuration>;
v = interfaceinvoke v.<org.apache.activemq.web.config.WebConsoleConfiguration: java.lang.String getJmxUser()>();
v[0] = v;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.web.config.WebConsoleConfiguration configuration>;
v = interfaceinvoke v.<org.apache.activemq.web.config.WebConsoleConfiguration: java.lang.String getJmxPassword()>();
v[1] = v;
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>("jmx.remote.credentials", v);
label:
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.web.config.WebConsoleConfiguration configuration>;
v = interfaceinvoke v.<org.apache.activemq.web.config.WebConsoleConfiguration: java.util.Collection getJmxUrls()>();
v = null;
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()>();
label:
v = staticinvoke <javax.management.remote.JMXConnectorFactory: javax.management.remote.JMXConnector connect(javax.management.remote.JMXServiceURL,java.util.Map)>(v, v);
interfaceinvoke v.<javax.management.remote.JMXConnector: void connect()>();
v = interfaceinvoke v.<javax.management.remote.JMXConnector: javax.management.MBeanServerConnection getMBeanServerConnection()>();
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: java.util.Set findBrokers(javax.management.MBeanServerConnection)>(v);
v = interfaceinvoke v.<java.util.Set: int size()>();
if v <= 0 goto label;
v = <org.apache.activemq.web.RemoteJMXBrokerFacade: org.slf4j.Logger LOG>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (javax.management.remote.JMXServiceURL)>(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[])>("Connected via JMX to the broker at \u0001");
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>(v);
label:
return v;
label:
v := @caughtexception;
v = v;
goto label;
label:
if v == null goto label;
v = v instanceof java.lang.RuntimeException;
if v == 0 goto label;
throw v;
label:
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.Throwable)>(v);
throw v;
label:
v = new java.lang.IllegalStateException;
v = interfaceinvoke v.<java.util.Collection: int size()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(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[])>("No broker is found at any of the \u configured urls");
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>(v);
throw v;
catch java.lang.Exception from label to label with label;
}
protected synchronized void closeConnection()
{
org.slf4j.Logger v;
java.io.IOException v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.String v, v;
javax.management.remote.JMXConnector v, v, v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.remote.JMXConnector connector>;
if v == null goto label;
label:
v = <org.apache.activemq.web.RemoteJMXBrokerFacade: org.slf4j.Logger LOG>;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.remote.JMXConnector connector>;
v = interfaceinvoke v.<javax.management.remote.JMXConnector: java.lang.String getConnectionId()>();
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[])>("Closing a connection to a broker (\u)");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.remote.JMXConnector connector>;
interfaceinvoke v.<javax.management.remote.JMXConnector: void close()>();
label:
goto label;
label:
v := @caughtexception;
label:
return;
catch java.io.IOException from label to label with label;
}
protected java.util.Set findBrokers(javax.management.MBeanServerConnection) throws java.io.IOException, javax.management.MalformedObjectNameException
{
javax.management.MBeanServerConnection v;
java.util.Iterator v;
java.util.Set v;
javax.management.ObjectName v, v, v;
java.util.HashSet v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.Object v, v;
java.lang.String v, v, v;
boolean v, v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: javax.management.MBeanServerConnection;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: java.lang.String brokerName>;
if v != null goto label;
v = new javax.management.ObjectName;
specialinvoke v.<javax.management.ObjectName: void <init>(java.lang.String)>("org.apache.activemq:type=Broker,brokerName=*");
v = v;
goto label;
label:
v = new javax.management.ObjectName;
v = v.<org.apache.activemq.web.RemoteJMXBrokerFacade: java.lang.String brokerName>;
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[])>("org.apache.activemq:type=Broker,brokerName=\u0001");
specialinvoke v.<javax.management.ObjectName: void <init>(java.lang.String)>(v);
v = v;
label:
v = interfaceinvoke v.<javax.management.MBeanServerConnection: java.util.Set queryNames(javax.management.ObjectName,javax.management.QueryExp)>(v, null);
v = new java.util.HashSet;
specialinvoke v.<java.util.HashSet: void <init>()>();
v = interfaceinvoke v.<java.util.Set: 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 = staticinvoke <javax.management.MBeanServerInvocationHandler: java.lang.Object newProxyInstance(javax.management.MBeanServerConnection,javax.management.ObjectName,java.lang.Class,boolean)>(v, v, class "Lorg/apache/activemq/broker/jmx/BrokerViewMBean;", 1);
v = interfaceinvoke v.<org.apache.activemq.broker.jmx.BrokerViewMBean: boolean isSlave()>();
if v != 0 goto label;
interfaceinvoke v.<java.util.Set: boolean add(java.lang.Object)>(v);
goto label;
label:
return v;
}
public void purgeQueue(org.apache.activemq.command.ActiveMQDestination) throws java.lang.Exception
{
org.apache.activemq.broker.jmx.QueueViewMBean v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.String v;
org.apache.activemq.command.ActiveMQDestination v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: org.apache.activemq.command.ActiveMQDestination;
v = virtualinvoke v.<org.apache.activemq.command.ActiveMQDestination: java.lang.String getPhysicalName()>();
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: org.apache.activemq.broker.jmx.QueueViewMBean getQueue(java.lang.String)>(v);
interfaceinvoke v.<org.apache.activemq.broker.jmx.QueueViewMBean: void purge()>();
return;
}
public org.apache.activemq.broker.jmx.ManagementContext getManagementContext()
{
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.IllegalStateException v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("not supported");
throw v;
}
protected java.util.Collection getManagedObjects(javax.management.ObjectName[], java.lang.Class)
{
javax.management.MBeanServerConnection v;
java.lang.RuntimeException v;
javax.management.ObjectName v;
java.lang.Exception v;
java.util.ArrayList v;
int v, v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.Class v;
java.lang.Object v;
javax.management.ObjectName[] v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: javax.management.ObjectName[];
v := @parameter: java.lang.Class;
label:
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.MBeanServerConnection getMBeanServerConnection()>();
label:
goto label;
label:
v := @caughtexception;
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.Throwable)>(v);
throw v;
label:
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
if v == null goto label;
v = 0;
label:
v = lengthof v;
if v >= v goto label;
v = v[v];
v = staticinvoke <javax.management.MBeanServerInvocationHandler: java.lang.Object newProxyInstance(javax.management.MBeanServerConnection,javax.management.ObjectName,java.lang.Class,boolean)>(v, v, v, 1);
if v == null goto label;
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
label:
v = v + 1;
goto label;
label:
return v;
catch java.lang.Exception from label to label with label;
}
public java.util.Set queryNames(javax.management.ObjectName, javax.management.QueryExp) throws java.lang.Exception
{
javax.management.MBeanServerConnection v;
javax.management.QueryExp v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.util.Set v;
javax.management.ObjectName v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: javax.management.ObjectName;
v := @parameter: javax.management.QueryExp;
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.MBeanServerConnection getMBeanServerConnection()>();
v = interfaceinvoke v.<javax.management.MBeanServerConnection: java.util.Set queryNames(javax.management.ObjectName,javax.management.QueryExp)>(v, v);
return v;
}
public java.lang.Object newProxyInstance(javax.management.ObjectName, java.lang.Class, boolean) throws java.lang.Exception
{
javax.management.MBeanServerConnection v;
org.apache.activemq.web.RemoteJMXBrokerFacade v;
java.lang.Class v;
java.lang.Object v;
javax.management.ObjectName v;
boolean v;
v := @this: org.apache.activemq.web.RemoteJMXBrokerFacade;
v := @parameter: javax.management.ObjectName;
v := @parameter: java.lang.Class;
v := @parameter: boolean;
v = virtualinvoke v.<org.apache.activemq.web.RemoteJMXBrokerFacade: javax.management.MBeanServerConnection getMBeanServerConnection()>();
v = staticinvoke <javax.management.MBeanServerInvocationHandler: java.lang.Object newProxyInstance(javax.management.MBeanServerConnection,javax.management.ObjectName,java.lang.Class,boolean)>(v, v, v, v);
return v;
}
static void <clinit>()
{
org.slf4j.Logger v;
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/apache/activemq/web/RemoteJMXBrokerFacade;");
<org.apache.activemq.web.RemoteJMXBrokerFacade: org.slf4j.Logger LOG> = v;
return;
}
}