test_class.declarator: handler
test_class.modifier: private
test_class.original_string: private ReadHandler handler;
test_class.type: ReadHandler
test_class.var_name: handler
test_class.declarator: testBeanName
test_class.modifier: private
test_class.original_string: private ObjectName testBeanName;
test_class.type: ObjectName
test_class.var_name: testBeanName
test_class.file: agent/core/src/test/java/org/jolokia/handler/ReadHandlerTest.java
test_class.identifier: ReadHandlerTest
test_class.superclass: extends BaseHandlerTest
test_case.body: @Test(groups = "java6")
      public void searchPatternSingleAttribute() throws Exception {
          ObjectName patternMBean = new ObjectName("java.lang:type=*");
          JmxReadRequest request = new JmxRequestBuilder(READ, patternMBean).
                  attribute("mem1").
                  build();
  
          ObjectName beans[] =  {
                  new ObjectName("java.lang:type=Memory"),
                  new ObjectName("java.lang:type=GarbageCollection")
          };
          MBeanServer server = prepareMultiAttributeTest(patternMBean, beans);
          expect(server.getAttribute(beans[0],"mem1")).andReturn("memval1");
  
          replay(server);
          Map res = (Map) handler.handleRequest(getMBeanServerManager(server), request);
          verify(server);
          assertEquals(1,res.size());
          assertEquals("memval1",((Map) res.get("java.lang:type=Memory")).get("mem1"));
      }
test_case.class_method_signature: ReadHandlerTest.searchPatternSingleAttribute()
test_case.full_signature: @Test(groups = "java6") public void searchPatternSingleAttribute()
test_case.identifier: searchPatternSingleAttribute
test_case.invocations: build attribute prepareMultiAttributeTest andReturn expect getAttribute replay handleRequest getMBeanServerManager verify assertEquals size assertEquals get get
test_case.modifiers: @Test(groups = "java6") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void searchPatternSingleAttribute()
focal_class.declarator: MBEAN_INFO_HANDLER =
              new MBeanServerExecutor.MBeanAction<MBeanInfo>() {
                  /** {@inheritDoc} */
                  public MBeanInfo execute(MBeanServerConnection pConn, ObjectName pName, Object... extraArgs)
                          throws ReflectionException, InstanceNotFoundException, IOException {
                      try {
                          return pConn.getMBeanInfo(pName);
                      } catch (IntrospectionException e) {
                          throw new IllegalArgumentException("Cannot inspect " + pName + ": " + e, e);
                      }
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final MBeanServerExecutor.MBeanAction<MBeanInfo> MBEAN_INFO_HANDLER =
              new MBeanServerExecutor.MBeanAction<MBeanInfo>() {
                  /** {@inheritDoc} */
                  public MBeanInfo execute(MBeanServerConnection pConn, ObjectName pName, Object... extraArgs)
                          throws ReflectionException, InstanceNotFoundException, IOException {
                      try {
                          return pConn.getMBeanInfo(pName);
                      } catch (IntrospectionException e) {
                          throw new IllegalArgumentException("Cannot inspect " + pName + ": " + e, e);
                      }
                  }
              };
focal_class.type: MBeanServerExecutor.MBeanAction<MBeanInfo>
focal_class.var_name: MBEAN_INFO_HANDLER
focal_class.declarator: MBEAN_ATTRIBUTE_READ_HANDLER =
              new MBeanServerExecutor.MBeanAction<Object>() {
                  /** {@inheritDoc} */
                  public Object execute(MBeanServerConnection pConn, ObjectName pName, Object... extraArgs)
                          throws ReflectionException, InstanceNotFoundException, IOException, MBeanException, AttributeNotFoundException {
                      String attribute = (String) extraArgs[0];
                      return pConn.getAttribute(pName, attribute);
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final MBeanServerExecutor.MBeanAction<Object> MBEAN_ATTRIBUTE_READ_HANDLER =
              new MBeanServerExecutor.MBeanAction<Object>() {
                  /** {@inheritDoc} */
                  public Object execute(MBeanServerConnection pConn, ObjectName pName, Object... extraArgs)
                          throws ReflectionException, InstanceNotFoundException, IOException, MBeanException, AttributeNotFoundException {
                      String attribute = (String) extraArgs[0];
                      return pConn.getAttribute(pName, attribute);
                  }
              };
focal_class.type: MBeanServerExecutor.MBeanAction<Object>
focal_class.var_name: MBEAN_ATTRIBUTE_READ_HANDLER
focal_class.file: agent/core/src/main/java/org/jolokia/handler/ReadHandler.java
focal_class.identifier: ReadHandler
focal_class.class_method_signature: ReadHandler.ReadHandler(Restrictor pRestrictor)
focal_class.full_signature: public  ReadHandler(Restrictor pRestrictor)
focal_class.identifier: ReadHandler
focal_class.modifiers: public
focal_class.parameters: (Restrictor pRestrictor)
focal_class.signature:  ReadHandler(Restrictor pRestrictor)
focal_class.class_method_signature: ReadHandler.getType()
focal_class.full_signature: @Override /** {@inheritDoc} */ public RequestType getType()
focal_class.identifier: getType
focal_class.modifiers: @Override /** {@inheritDoc} */ public
focal_class.parameters: ()
focal_class.return: RequestType
focal_class.signature: RequestType getType()
focal_class.class_method_signature: ReadHandler.handleAllServersAtOnce(JmxReadRequest pRequest)
focal_class.full_signature: @Override public boolean handleAllServersAtOnce(JmxReadRequest pRequest)
focal_class.identifier: handleAllServersAtOnce
focal_class.modifiers: @Override public
focal_class.parameters: (JmxReadRequest pRequest)
focal_class.return: boolean
focal_class.signature: boolean handleAllServersAtOnce(JmxReadRequest pRequest)
focal_class.class_method_signature: ReadHandler.doHandleRequest(MBeanServerConnection pServer, JmxReadRequest pRequest)
focal_class.full_signature: @Override public Object doHandleRequest(MBeanServerConnection pServer, JmxReadRequest pRequest)
focal_class.identifier: doHandleRequest
focal_class.modifiers: @Override public
focal_class.parameters: (MBeanServerConnection pServer, JmxReadRequest pRequest)
focal_class.return: Object
focal_class.signature: Object doHandleRequest(MBeanServerConnection pServer, JmxReadRequest pRequest)
focal_class.class_method_signature: ReadHandler.doHandleRequest(MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.full_signature: @Override /** {@inheritDoc} */ public Object doHandleRequest(MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.identifier: doHandleRequest
focal_class.modifiers: @Override /** {@inheritDoc} */ public
focal_class.parameters: (MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.return: Object
focal_class.signature: Object doHandleRequest(MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.class_method_signature: ReadHandler.fetchAttributesForMBeanPattern(MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.full_signature: private Object fetchAttributesForMBeanPattern(MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.identifier: fetchAttributesForMBeanPattern
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.return: Object
focal_class.signature: Object fetchAttributesForMBeanPattern(MBeanServerExecutor pServerManager, JmxReadRequest pRequest)
focal_class.class_method_signature: ReadHandler.searchMBeans(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.full_signature: private Set<ObjectName> searchMBeans(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.identifier: searchMBeans
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.return: Set<ObjectName>
focal_class.signature: Set<ObjectName> searchMBeans(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.class_method_signature: ReadHandler.filterAttributeNames(MBeanServerExecutor pSeverManager,ObjectName pName, List<String> pNames)
focal_class.full_signature: private List<String> filterAttributeNames(MBeanServerExecutor pSeverManager,ObjectName pName, List<String> pNames)
focal_class.identifier: filterAttributeNames
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pSeverManager,ObjectName pName, List<String> pNames)
focal_class.return: List<String>
focal_class.signature: List<String> filterAttributeNames(MBeanServerExecutor pSeverManager,ObjectName pName, List<String> pNames)
focal_class.class_method_signature: ReadHandler.fetchAttributes(MBeanServerExecutor pServerManager, ObjectName pMBeanName, List<String> pAttributeNames,
                                     ValueFaultHandler pFaultHandler)
focal_class.full_signature: private Object fetchAttributes(MBeanServerExecutor pServerManager, ObjectName pMBeanName, List<String> pAttributeNames,
                                     ValueFaultHandler pFaultHandler)
focal_class.identifier: fetchAttributes
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pServerManager, ObjectName pMBeanName, List<String> pAttributeNames,
                                     ValueFaultHandler pFaultHandler)
focal_class.return: Object
focal_class.signature: Object fetchAttributes(MBeanServerExecutor pServerManager, ObjectName pMBeanName, List<String> pAttributeNames,
                                     ValueFaultHandler pFaultHandler)
focal_class.class_method_signature: ReadHandler.resolveAttributes(MBeanServerExecutor pServers, ObjectName pMBeanName, List<String> pAttributeNames)
focal_class.full_signature: private List<String> resolveAttributes(MBeanServerExecutor pServers, ObjectName pMBeanName, List<String> pAttributeNames)
focal_class.identifier: resolveAttributes
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pServers, ObjectName pMBeanName, List<String> pAttributeNames)
focal_class.return: List<String>
focal_class.signature: List<String> resolveAttributes(MBeanServerExecutor pServers, ObjectName pMBeanName, List<String> pAttributeNames)
focal_class.class_method_signature: ReadHandler.shouldAllAttributesBeFetched(List<String> pAttributeNames)
focal_class.full_signature: private boolean shouldAllAttributesBeFetched(List<String> pAttributeNames)
focal_class.identifier: shouldAllAttributesBeFetched
focal_class.modifiers: private
focal_class.parameters: (List<String> pAttributeNames)
focal_class.return: boolean
focal_class.signature: boolean shouldAllAttributesBeFetched(List<String> pAttributeNames)
focal_class.class_method_signature: ReadHandler.getMBeanInfo(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.full_signature: private MBeanInfo getMBeanInfo(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.identifier: getMBeanInfo
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.return: MBeanInfo
focal_class.signature: MBeanInfo getMBeanInfo(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.class_method_signature: ReadHandler.getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
focal_class.full_signature: private Object getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
focal_class.identifier: getAttribute
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
focal_class.return: Object
focal_class.signature: Object getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
focal_class.class_method_signature: ReadHandler.getAllAttributesNames(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.full_signature: private List<String> getAllAttributesNames(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.identifier: getAllAttributesNames
focal_class.modifiers: private
focal_class.parameters: (MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.return: List<String>
focal_class.signature: List<String> getAllAttributesNames(MBeanServerExecutor pServerManager, ObjectName pObjectName)
focal_class.class_method_signature: ReadHandler.checkRestriction(ObjectName mBeanName, String attribute)
focal_class.full_signature: private void checkRestriction(ObjectName mBeanName, String attribute)
focal_class.identifier: checkRestriction
focal_class.modifiers: private
focal_class.parameters: (ObjectName mBeanName, String attribute)
focal_class.return: void
focal_class.signature: void checkRestriction(ObjectName mBeanName, String attribute)
focal_class.class_method_signature: ReadHandler.checkForRestriction(JmxReadRequest pRequest)
focal_class.full_signature: @Override protected void checkForRestriction(JmxReadRequest pRequest)
focal_class.identifier: checkForRestriction
focal_class.modifiers: @Override protected
focal_class.parameters: (JmxReadRequest pRequest)
focal_class.return: void
focal_class.signature: void checkForRestriction(JmxReadRequest pRequest)
focal_class.superclass: extends JsonRequestHandler<JmxReadRequest>
focal_method.body: private Object getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
              throws MBeanException, ReflectionException, IOException, AttributeNotFoundException, InstanceNotFoundException {
          return pServerManager.call(pMBeanName, MBEAN_ATTRIBUTE_READ_HANDLER, attribute);
      }
focal_method.class_method_signature: ReadHandler.getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
focal_method.full_signature: private Object getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
focal_method.identifier: getAttribute
focal_method.invocations: call
focal_method.modifiers: private
focal_method.parameters: (MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)
focal_method.return: Object
focal_method.signature: Object getAttribute(MBeanServerExecutor pServerManager, ObjectName pMBeanName, String attribute)