Examples of AbtractJ4pMBeanRequest


Examples of org.jolokia.client.request.AbtractJ4pMBeanRequest

    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        String name = method.getName();
        String attribute;
        AbtractJ4pMBeanRequest request;
        if ((attribute = getterAttributeName(method)) != null) {
            request = new J4pReadRequest(objectName, attribute);
        } else if ((attribute = setterAttributeName(method)) != null) {
            request = new J4pWriteRequest(objectName, attribute, args[0]);
        } else {
            name = executeMethodName(method);
            if (args == null | method.getParameterTypes().length == 0) {
                request = new J4pExecRequest(objectName, name);
            } else {
                request = new J4pExecRequest(objectName, name, args);
            }
        }
        try {
            request.setPreferredHttpMethod("POST");
            J4pResponse response = jolokia.execute(request);
            Object value = response.getValue();
            return JolokiaClients.convertJolokiaToJavaType(method.getReturnType(), value);
        } catch (J4pException e) {
            List<Object> argsList = args == null ? null : Arrays.asList(args);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.