this.rmiConnector.addNotificationListener(new ConnectionNotificationAdapter(), new ConnectionNotificationFilterImpl(), this);
shiroAuthenticator = new JMXShiroAuthenticator(this.securityService); env.put(JMXConnectorServer.AUTHENTICATOR, shiroAuthenticator); jmxConnectorServer.addNotificationListener(shiroAuthenticator, null, jmxConnectorServer.getAttributes());
@Override protected final void init() { synchronized (this) { if (this.jmxEnabled && !this.isTerminated()) { final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); if (this.serverObjectName != null) { try { mbs.registerMBean(this.server, this.serverObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOGGER.warn("Unable to register JMXServer MBean", e); } } if (this.controllerObjectName != null) { try { // MXBeans is currently not possible (getClasses in IRecord) final StandardMBean mbean = new StandardMBean(this.monitoringController, IMonitoringController.class); mbs.registerMBean(mbean, this.controllerObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOGGER.warn("Unable to register Monitoring Controller MBean", e); } } if ((this.server != null) && this.server.isActive()) { this.server.addNotificationListener(this.serverNotificationListener, null, null); } } } }
filter.enableType(JMXConnectionNotification.CLOSED); filter.enableType(JMXConnectionNotification.FAILED); server.addNotificationListener(authenticator, filter, null);
filter.enableType(JMXConnectionNotification.CLOSED); filter.enableType(JMXConnectionNotification.FAILED); server.addNotificationListener(authenticator, filter, null);
public void doStart() throws Exception { jmxServiceURL = new JMXServiceURL(protocol, host, port, urlPath); Map env = new HashMap(); if (applicationConfigName != null) { authenticator = new Authenticator(applicationConfigName, classLoader); env.put(JMXConnectorServer.AUTHENTICATOR, authenticator); } else { log.warn("Starting unauthenticating JMXConnector for " + jmxServiceURL); } server = JMXConnectorServerFactory.newJMXConnectorServer(jmxServiceURL, env, mbeanServer); NotificationFilterSupport filter = new NotificationFilterSupport(); filter.enableType(JMXConnectionNotification.OPENED); filter.enableType(JMXConnectionNotification.CLOSED); filter.enableType(JMXConnectionNotification.FAILED); server.addNotificationListener(authenticator, filter, null); server.start(); log.debug("Started JMXConnector " + server.getAddress()); }
@Override protected final void init() { synchronized (this) { if (this.jmxEnabled && !this.isTerminated()) { final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); if (this.serverObjectName != null) { try { mbs.registerMBean(this.server, this.serverObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOG.warn("Unable to register JMXServer MBean", e); } } if (this.controllerObjectName != null) { try { // MXBeans is currently not possible (getClasses in IRecord) final StandardMBean mbean = new StandardMBean(this.monitoringController, IMonitoringController.class); mbs.registerMBean(mbean, this.controllerObjectName); } catch (final Exception e) { // NOPMD NOCS (IllegalCatchCheck) LOG.warn("Unable to register Monitoring Controller MBean", e); } } if ((this.server != null) && this.server.isActive()) { this.server.addNotificationListener(this.serverNotificationListener, null, null); } } } }
mConnectorServer.addNotificationListener(mBootListener, null, mJMXServiceURL.toString());
filter.enableType(JMXConnectionNotification.OPENED); filter.enableType(JMXConnectionNotification.CLOSED); connectorServer.addNotificationListener(this, filter, null);
this.rmiConnector.addNotificationListener( new ConnectionNotificationAdapter(), new ConnectionNotificationFilterImpl(),
this.rmiConnector.addNotificationListener( new ConnectionNotificationAdapter(), new ConnectionNotificationFilterImpl(),
_cs.addNotificationListener(jmxManagementUserLogonLogoffReporter, jmxManagementUserLogonLogoffReporter, null); _cs.addNotificationListener(usernameCachingRmiServer, usernameCachingRmiServer, null);