Examples of ApplicationMXBean


Examples of org.glassfish.tyrus.ext.monitoring.jmx.ApplicationMXBean

    }

    private boolean isEndpointRegistered(String applicationName, EndpointClassNamePathPair endpoint) {
        MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
        String fullMxBeanName = "org.glassfish.tyrus:type=" + applicationName;
        ApplicationMXBean proxy;
        try {
            proxy = JMX.newMXBeanProxy(mBeanServer, new ObjectName(fullMxBeanName), ApplicationMXBean.class);
            List<EndpointClassNamePathPair> registeredEndpoints = proxy.getEndpoints();
            for (EndpointClassNamePathPair registeredEndpoint : registeredEndpoints) {
                if (registeredEndpoint.getEndpointPath().equals(endpoint.getEndpointPath()) && registeredEndpoint.getEndpointClassName().equals(endpoint.getEndpointClassName())) {
                    return true;
                }
            }
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.