Package org.jolokia.client.request

Examples of org.jolokia.client.request.J4pReadResponse


    }
   
    public <T extends Object> T read(String attribute) {
      try {
          J4pReadRequest request = JolokiaHelpers.createReadRequest(FABRIC_MBEAN_URL, attribute);
          J4pReadResponse response = j4p.execute(request);
          return response.getValue();
      } catch (Exception e) {
          throw new RuntimeException("Failed to read " + attribute, e);
      }
    }
View Full Code Here


   * @param string
   * @return
   */
  public String readAttribute(String mbeanName, String attribute) {
    J4pReadRequest readRequest;
    J4pReadResponse readResponse = null;
    try {
      readRequest = new J4pReadRequest(mbeanName, attribute);
      readResponse = j4pClient.execute(readRequest);
    } catch (MalformedObjectNameException e) {
      return e.getMessage();
    } catch (J4pException e) {
      return e.getMessage();
    }
   
    return readResponse.getValue().toString();
  }
View Full Code Here

TOP

Related Classes of org.jolokia.client.request.J4pReadResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.