test_class.declarator: handler
test_class.original_string: MBeanServerHandler handler;
test_class.type: MBeanServerHandler
test_class.var_name: handler
test_class.file: agent/jmx/src/test/java/org/jolokia/jmx/JolokiaMBeanServerUtilTest.java
test_class.identifier: JolokiaMBeanServerUtilTest
test_class.interfaces: implements LogHandler
test_case.body: @Test
      public void checkNotRegistered() throws MalformedObjectNameException {
          MBeanServer jolokiaServer = JolokiaMBeanServerUtil.getJolokiaMBeanServer();
          Assert.assertNotEquals(ManagementFactory.getPlatformMBeanServer(), jolokiaServer);
          for (MBeanServer server : MBeanServerFactory.findMBeanServer(null)) {
              Assert.assertNotEquals(server, jolokiaServer);
          }
      }
test_case.class_method_signature: JolokiaMBeanServerUtilTest.checkNotRegistered()
test_case.full_signature: @Test public void checkNotRegistered()
test_case.identifier: checkNotRegistered
test_case.invocations: getJolokiaMBeanServer assertNotEquals getPlatformMBeanServer findMBeanServer assertNotEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void checkNotRegistered()
focal_class.declarator: JOLOKIA_MBEAN_SERVER_ATTRIBUTE = "JolokiaMBeanServer"
focal_class.modifier: public static final
focal_class.original_string: public static final String JOLOKIA_MBEAN_SERVER_ATTRIBUTE = "JolokiaMBeanServer";
focal_class.type: String
focal_class.var_name: JOLOKIA_MBEAN_SERVER_ATTRIBUTE
focal_class.file: agent/jmx/src/main/java/org/jolokia/jmx/JolokiaMBeanServerUtil.java
focal_class.identifier: JolokiaMBeanServerUtil
focal_class.class_method_signature: JolokiaMBeanServerUtil.JolokiaMBeanServerUtil()
focal_class.full_signature: private  JolokiaMBeanServerUtil()
focal_class.identifier: JolokiaMBeanServerUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  JolokiaMBeanServerUtil()
focal_class.class_method_signature: JolokiaMBeanServerUtil.getJolokiaMBeanServer()
focal_class.full_signature: public static MBeanServer getJolokiaMBeanServer()
focal_class.identifier: getJolokiaMBeanServer
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: MBeanServer
focal_class.signature: MBeanServer getJolokiaMBeanServer()
focal_class.class_method_signature: JolokiaMBeanServerUtil.registerMBean(Object object, ObjectName name)
focal_class.full_signature: public static ObjectInstance registerMBean(Object object, ObjectName name)
focal_class.identifier: registerMBean
focal_class.modifiers: public static
focal_class.parameters: (Object object, ObjectName name)
focal_class.return: ObjectInstance
focal_class.signature: ObjectInstance registerMBean(Object object, ObjectName name)
focal_class.class_method_signature: JolokiaMBeanServerUtil.unregisterMBean(ObjectName name)
focal_class.full_signature: public static void unregisterMBean(ObjectName name)
focal_class.identifier: unregisterMBean
focal_class.modifiers: public static
focal_class.parameters: (ObjectName name)
focal_class.return: void
focal_class.signature: void unregisterMBean(ObjectName name)
focal_class.class_method_signature: JolokiaMBeanServerUtil.registerJolokiaMBeanServerHolderMBean(MBeanServer pServer)
focal_class.full_signature: static MBeanServer registerJolokiaMBeanServerHolderMBean(MBeanServer pServer)
focal_class.identifier: registerJolokiaMBeanServerHolderMBean
focal_class.modifiers: static
focal_class.parameters: (MBeanServer pServer)
focal_class.return: MBeanServer
focal_class.signature: MBeanServer registerJolokiaMBeanServerHolderMBean(MBeanServer pServer)
focal_class.class_method_signature: JolokiaMBeanServerUtil.createObjectName(String pName)
focal_class.full_signature: private static ObjectName createObjectName(String pName)
focal_class.identifier: createObjectName
focal_class.modifiers: private static
focal_class.parameters: (String pName)
focal_class.return: ObjectName
focal_class.signature: ObjectName createObjectName(String pName)
focal_method.body: public static MBeanServer getJolokiaMBeanServer() {
          MBeanServer server = ManagementFactory.getPlatformMBeanServer();
          MBeanServer jolokiaMBeanServer;
          try {
              jolokiaMBeanServer =
                      (MBeanServer) server.getAttribute(createObjectName(JolokiaMBeanServerHolderMBean.OBJECT_NAME),
                                                        JOLOKIA_MBEAN_SERVER_ATTRIBUTE);
          } catch (InstanceNotFoundException exp) {
              // should be probably locked, but for simplicity reasons and because
              // the probability of a clash is fairly low (can happen only once), it's omitted
              // here. Note, that server.getAttribute() itself is threadsafe.
              jolokiaMBeanServer = registerJolokiaMBeanServerHolderMBean(server);
          } catch (JMException e) {
              throw new IllegalStateException("Internal: Cannot get JolokiaMBean server via JMX lookup: " + e,e);
          }
          return jolokiaMBeanServer;
      }
focal_method.class_method_signature: JolokiaMBeanServerUtil.getJolokiaMBeanServer()
focal_method.full_signature: public static MBeanServer getJolokiaMBeanServer()
focal_method.identifier: getJolokiaMBeanServer
focal_method.invocations: getPlatformMBeanServer getAttribute createObjectName registerJolokiaMBeanServerHolderMBean
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: MBeanServer
focal_method.signature: MBeanServer getJolokiaMBeanServer()