Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 11 java.management.jmod - Management Module
JDK 11 java.management.jmod is the JMOD file for JDK 11 Management module.
JDK 11 Management module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.management.jmod.
JDK 11 Management module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Management module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.management.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/jmx/mbeanserver/MXBeanProxy.java
/*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.jmx.mbeanserver;
import static com.sun.jmx.mbeanserver.Util.*;
import java.lang.reflect.Method;
import java.util.Map;
import javax.management.Attribute;
import javax.management.MBeanServerConnection;
import javax.management.NotCompliantMBeanException;
import javax.management.ObjectName;
/**
<p>Helper class for an {@link InvocationHandler} that forwards methods from an
MXBean interface to a named
MXBean in an MBean Server and handles translation between the
arbitrary Java types in the interface and the Open Types used
by the MXBean.</p>
@since 1.6
*/
public class MXBeanProxy {
public MXBeanProxy(Class<?> mxbeanInterface) {
if (mxbeanInterface == null)
throw new IllegalArgumentException("Null parameter");
final MBeanAnalyzer<ConvertingMethod> analyzer;
try {
analyzer =
MXBeanIntrospector.getInstance().getAnalyzer(mxbeanInterface);
} catch (NotCompliantMBeanException e) {
throw new IllegalArgumentException(e);
}
analyzer.visit(new Visitor());
}
private class Visitor
implements MBeanAnalyzer.MBeanVisitor<ConvertingMethod> {
public void visitAttribute(String attributeName,
ConvertingMethod getter,
ConvertingMethod setter) {
if (getter != null) {
getter.checkCallToOpen();
Method getterMethod = getter.getMethod();
handlerMap.put(getterMethod,
new GetHandler(attributeName, getter));
}
if (setter != null) {
// return type is void, no need for checkCallToOpen
Method setterMethod = setter.getMethod();
handlerMap.put(setterMethod,
new SetHandler(attributeName, setter));
}
}
public void visitOperation(String operationName,
ConvertingMethod operation) {
operation.checkCallToOpen();
Method operationMethod = operation.getMethod();
String[] sig = operation.getOpenSignature();
handlerMap.put(operationMethod,
new InvokeHandler(operationName, sig, operation));
}
}
private static abstract class Handler {
Handler(String name, ConvertingMethod cm) {
this.name = name;
this.convertingMethod = cm;
}
String getName() {
return name;
}
ConvertingMethod getConvertingMethod() {
return convertingMethod;
}
abstract Object invoke(MBeanServerConnection mbsc,
ObjectName name, Object[] args) throws Exception;
private final String name;
private final ConvertingMethod convertingMethod;
}
private static class GetHandler extends Handler {
GetHandler(String attributeName, ConvertingMethod cm) {
super(attributeName, cm);
}
@Override
Object invoke(MBeanServerConnection mbsc, ObjectName name, Object[] args)
throws Exception {
assert(args == null || args.length == 0);
return mbsc.getAttribute(name, getName());
}
}
private static class SetHandler extends Handler {
SetHandler(String attributeName, ConvertingMethod cm) {
super(attributeName, cm);
}
@Override
Object invoke(MBeanServerConnection mbsc, ObjectName name, Object[] args)
throws Exception {
assert(args.length == 1);
Attribute attr = new Attribute(getName(), args[0]);
mbsc.setAttribute(name, attr);
return null;
}
}
private static class InvokeHandler extends Handler {
InvokeHandler(String operationName, String[] signature,
ConvertingMethod cm) {
super(operationName, cm);
this.signature = signature;
}
Object invoke(MBeanServerConnection mbsc, ObjectName name, Object[] args)
throws Exception {
return mbsc.invoke(name, getName(), args, signature);
}
private final String[] signature;
}
public Object invoke(MBeanServerConnection mbsc, ObjectName name,
Method method, Object[] args)
throws Throwable {
Handler handler = handlerMap.get(method);
ConvertingMethod cm = handler.getConvertingMethod();
MXBeanLookup lookup = MXBeanLookup.lookupFor(mbsc);
MXBeanLookup oldLookup = MXBeanLookup.getLookup();
try {
MXBeanLookup.setLookup(lookup);
Object[] openArgs = cm.toOpenParameters(lookup, args);
Object result = handler.invoke(mbsc, name, openArgs);
return cm.fromOpenReturnValue(lookup, result);
} finally {
MXBeanLookup.setLookup(oldLookup);
}
}
private final Map<Method, Handler> handlerMap = newMap();
}
⏎ com/sun/jmx/mbeanserver/MXBeanProxy.java
Or download all of them as a single archive file:
File name: java.management-11.0.1-src.zip File size: 828174 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.management.rmi.jmod - Management RMI Module
2020-04-30, ≈130🔥, 0💬
Popular Posts:
commons-collections4-4.2 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...
What Is junit-3.8.1.jar? junit-3.8.1.jar is the version 3.8.1 of JUnit JAR library file. JUnit is a ...
JDK 11 java.xml.crypto.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) Crypto modu...
What is the jaxp\TypeInfoWriter.java provided in the Apache Xerces package? I have Apache Xerces 2.1...
What is the dom\ElementPrinter.java provided in the Apache Xerces package? I have Apache Xerces 2.11...