Examples of MBeanOperationSignature


Examples of org.apache.geronimo.kernel.jmx.MBeanOperationSignature

        // build operationName->operationInfo map
        MBeanOperationInfo[] operationInfos = info.getOperations();
        Map operations = new HashMap(operationInfos.length);
        for (int i = 0; i < operationInfos.length; i++) {
            MBeanOperationInfo operationInfo = operationInfos[i];
            operations.put(new MBeanOperationSignature(operationInfo), operationInfo);
        }

        // build the method lookup table
        FastClass fastClass = FastClass.create(proxyType);
        InvokeMBean[] methodTable = new InvokeMBean[fastClass.getMaxIndex() + 1];
        Method[] methods = proxyType.getMethods();
        for (int i = 0; i < methods.length; i++) {
            Method method = methods[i];
            int index = getSuperIndex(proxyType, method);
            if (index >= 0) {
                if (operations.containsKey(new MBeanOperationSignature(method))) {
                    methodTable[index] = new InvokeMBean(method, false, false);
                } else if (method.getName().startsWith("get") && attributes.containsKey(method.getName().substring(3))) {
                    methodTable[index] = new InvokeMBean(method, true, true);
                } else if (method.getName().startsWith("is") && attributes.containsKey(method.getName().substring(2))) {
                    methodTable[index] = new InvokeMBean(method, true, true);
View Full Code Here

Examples of org.apache.geronimo.kernel.jmx.MBeanOperationSignature

            }
            Set sourceOperations = source.getOperations();
            if (sourceOperations != null && !sourceOperations.isEmpty()) {
                for (Iterator it = sourceOperations.iterator(); it.hasNext();) {
                    GOperationInfo operationInfo = (GOperationInfo) it.next();
                    operations.put(new MBeanOperationSignature(operationInfo.getName(),
                            operationInfo.getParameterList()), operationInfo);
                }
            }
            references.addAll(source.getReferences());
            notifications.addAll(source.getNotifications());
View Full Code Here

Examples of org.apache.geronimo.kernel.jmx.MBeanOperationSignature

    public void setConstructor(String[] names, Class[] types) {
        constructor = new GConstructorInfo(names, types);
    }

    public void addOperation(GOperationInfo operationInfo) {
        operations.put(new MBeanOperationSignature(operationInfo.getName(), operationInfo.getParameterList()),
                       operationInfo);
    }
View Full Code Here

Examples of org.apache.geronimo.kernel.jmx.MBeanOperationSignature

        Class[] parameters = method.getParameterTypes();
        String[] types = new String[parameters.length];
        for (int i = 0; i < parameters.length; i++) {
            types[i] = parameters[i].getName();
        }
        MBeanOperationSignature key = new MBeanOperationSignature(method.getName(), types);
        operations.put(key, new Operation(target, method));
    }
View Full Code Here

Examples of org.apache.geronimo.kernel.jmx.MBeanOperationSignature

        }
        operation.invoke(new Object[] {value});
    }

    public Object invoke(String name, Object[] arguments, String[] types) throws Exception {
        Operation operation = (Operation) operations.get(new MBeanOperationSignature(name, types));
        if (operation == null) {
            throw new IllegalArgumentException("Unknown attribute " + name);
        }
        return operation.invoke(arguments);
    }
View Full Code Here

Examples of org.apache.geronimo.kernel.jmx.MBeanOperationSignature

        }
        return results;
    }

    public Object invoke(String methodName, Object[] arguments, String[] types) throws MBeanException, ReflectionException {
        MBeanOperationSignature key = new MBeanOperationSignature(methodName, types);
        Object operation = operationMap.get(key);
        if (operation == null) {
            throw new ReflectionException(new NoSuchMethodException("Unknown operation " + key));
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.jmx.MBeanOperationSignature

        // add to reference map
        referenceMap.put(referenceName, mbeanReference);
    }

    private void addOperation(GBeanMBeanOperation mbeanOperation) {
        MBeanOperationSignature signature = new MBeanOperationSignature(mbeanOperation.getName(), mbeanOperation.getParameterTypes());
        operationMap.put(signature, mbeanOperation);
    }
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.