test_class.declarator: detector = new LightstreamerDetector()
test_class.original_string: LightstreamerDetector detector = new LightstreamerDetector();
test_class.type: LightstreamerDetector
test_class.var_name: detector
test_class.file: agent/core/src/test/java/org/jolokia/detector/LightstreamerDetectorTest.java
test_class.identifier: LightstreamerDetectorTest
test_class.superclass: extends BaseDetectorTest
test_case.body: @Test
      public void testDetect() throws MalformedObjectNameException, AttributeNotFoundException, MBeanException, ReflectionException, InstanceNotFoundException {
          String version = "6.0.1";
          MBeanServer mockServer = createMock(MBeanServer.class);
          ObjectName oName = new ObjectName("com.lightstreamer:type=Server");
          expect(mockServer.queryNames(new ObjectName("com.lightstreamer:type=Server"), null)).
                  andReturn(new HashSet<ObjectName>(Arrays.asList(oName))).anyTimes();
          expect(mockServer.isRegistered(oName)).andStubReturn(true);
          expect(mockServer.getAttribute(oName,"LSVersion")).andStubReturn(version);
          replay(mockServer);
  
          ServerHandle handle = detector.detect(getMBeanServerManager(mockServer));
          assertNotNull(handle);
          assertEquals(handle.getVersion(),version);
      }
test_case.class_method_signature: LightstreamerDetectorTest.testDetect()
test_case.full_signature: @Test public void testDetect()
test_case.identifier: testDetect
test_case.invocations: createMock anyTimes andReturn expect queryNames asList andStubReturn expect isRegistered andStubReturn expect getAttribute replay detect getMBeanServerManager assertNotNull assertEquals getVersion
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDetect()
focal_class.declarator: SYSTEM_PROERTY_NAMES = new String[]{
          "com.lightstreamer.internal_lib_path",
          "com.lightstreamer.kernel_lib_path",
          "com.lightstreamer.logging_lib_path",
          "com.lightstreamer.database_lib_path"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] SYSTEM_PROERTY_NAMES = new String[]{
          "com.lightstreamer.internal_lib_path",
          "com.lightstreamer.kernel_lib_path",
          "com.lightstreamer.logging_lib_path",
          "com.lightstreamer.database_lib_path"};
focal_class.type: String[]
focal_class.var_name: SYSTEM_PROERTY_NAMES
focal_class.declarator: LIGHTSTREAMER_DETECT_TIMEOUT = 5 * 60 * 1000
focal_class.modifier: private static final
focal_class.original_string: private static final int LIGHTSTREAMER_DETECT_TIMEOUT = 5 * 60 * 1000;
focal_class.type: int
focal_class.var_name: LIGHTSTREAMER_DETECT_TIMEOUT
focal_class.declarator: LIGHTSTREAMER_DETECT_INTERVAL = 200
focal_class.modifier: private static final
focal_class.original_string: private static final int LIGHTSTREAMER_DETECT_INTERVAL = 200;
focal_class.type: int
focal_class.var_name: LIGHTSTREAMER_DETECT_INTERVAL
focal_class.declarator: LIGHTSTREAMER_DETECT_FINAL_DELAY = 500
focal_class.modifier: private static final
focal_class.original_string: private static final int LIGHTSTREAMER_DETECT_FINAL_DELAY = 500;
focal_class.type: int
focal_class.var_name: LIGHTSTREAMER_DETECT_FINAL_DELAY
focal_class.declarator: LIGHTSTREAMER_MBEAN_CLASS = "com.lightstreamer.jmx.ServerMBean"
focal_class.modifier: private static final
focal_class.original_string: private static final String LIGHTSTREAMER_MBEAN_CLASS = "com.lightstreamer.jmx.ServerMBean";
focal_class.type: String
focal_class.var_name: LIGHTSTREAMER_MBEAN_CLASS
focal_class.file: agent/core/src/main/java/org/jolokia/detector/LightstreamerDetector.java
focal_class.identifier: LightstreamerDetector
focal_class.class_method_signature: LightstreamerDetector.detect(MBeanServerExecutor pMBeanServerExecutor)
focal_class.full_signature: public ServerHandle detect(MBeanServerExecutor pMBeanServerExecutor)
focal_class.identifier: detect
focal_class.modifiers: public
focal_class.parameters: (MBeanServerExecutor pMBeanServerExecutor)
focal_class.return: ServerHandle
focal_class.signature: ServerHandle detect(MBeanServerExecutor pMBeanServerExecutor)
focal_class.class_method_signature: LightstreamerDetector.jvmAgentStartup(Instrumentation instrumentation)
focal_class.full_signature: @Override public void jvmAgentStartup(Instrumentation instrumentation)
focal_class.identifier: jvmAgentStartup
focal_class.modifiers: @Override public
focal_class.parameters: (Instrumentation instrumentation)
focal_class.return: void
focal_class.signature: void jvmAgentStartup(Instrumentation instrumentation)
focal_class.class_method_signature: LightstreamerDetector.isLightStreamer(Instrumentation instrumentation)
focal_class.full_signature: protected boolean isLightStreamer(Instrumentation instrumentation)
focal_class.identifier: isLightStreamer
focal_class.modifiers: protected
focal_class.parameters: (Instrumentation instrumentation)
focal_class.return: boolean
focal_class.signature: boolean isLightStreamer(Instrumentation instrumentation)
focal_class.class_method_signature: LightstreamerDetector.awaitLightstreamerMBeans(Instrumentation instrumentation)
focal_class.full_signature: private void awaitLightstreamerMBeans(Instrumentation instrumentation)
focal_class.identifier: awaitLightstreamerMBeans
focal_class.modifiers: private
focal_class.parameters: (Instrumentation instrumentation)
focal_class.return: void
focal_class.signature: void awaitLightstreamerMBeans(Instrumentation instrumentation)
focal_class.superclass: extends AbstractServerDetector
focal_method.body: public ServerHandle detect(MBeanServerExecutor pMBeanServerExecutor) {
          String serverVersion = getSingleStringAttribute(pMBeanServerExecutor, "com.lightstreamer:type=Server", "LSVersion");
          if (serverVersion != null) {
              return new ServerHandle("LightStreamer", "LightStreamer", serverVersion, null);
          }
          return null;
      }
focal_method.class_method_signature: LightstreamerDetector.detect(MBeanServerExecutor pMBeanServerExecutor)
focal_method.full_signature: public ServerHandle detect(MBeanServerExecutor pMBeanServerExecutor)
focal_method.identifier: detect
focal_method.invocations: getSingleStringAttribute
focal_method.modifiers: public
focal_method.parameters: (MBeanServerExecutor pMBeanServerExecutor)
focal_method.return: ServerHandle
focal_method.signature: ServerHandle detect(MBeanServerExecutor pMBeanServerExecutor)