List of usage examples for org.springframework.boot.actuate.endpoint.jmx EndpointMBean EndpointMBean
EndpointMBean(JmxOperationResponseMapper responseMapper, ClassLoader classLoader, ExposableJmxEndpoint endpoint)
From source file:org.springframework.boot.actuate.endpoint.jmx.JmxEndpointExporter.java
private ObjectName register(ExposableJmxEndpoint endpoint) { Assert.notNull(endpoint, "Endpoint must not be null"); try {// ww w .j av a 2s .c o m ObjectName name = this.objectNameFactory.getObjectName(endpoint); EndpointMBean mbean = new EndpointMBean(this.responseMapper, this.classLoader, endpoint); this.mBeanServer.registerMBean(mbean, name); return name; } catch (MalformedObjectNameException ex) { throw new IllegalStateException("Invalid ObjectName for " + getEndpointDescription(endpoint), ex); } catch (Exception ex) { throw new MBeanExportException("Failed to register MBean for " + getEndpointDescription(endpoint), ex); } }