/** * Creates lazy proxies for the {@code JMXConnector} and {@code MBeanServerConnection}. */ private void createLazyConnection() { this.connectorTargetSource = new JMXConnectorLazyInitTargetSource(); TargetSource connectionTargetSource = new MBeanServerConnectionLazyInitTargetSource(); this.connector = (JMXConnector) new ProxyFactory(JMXConnector.class, this.connectorTargetSource).getProxy(this.beanClassLoader); this.connection = (MBeanServerConnection) new ProxyFactory(MBeanServerConnection.class, connectionTargetSource).getProxy(this.beanClassLoader); }
/** * Closes the underlying {@code JMXConnector}. */ @Override public void destroy() throws IOException { if (this.connector != null && (this.connectorTargetSource == null || this.connectorTargetSource.isInitialized())) { this.connector.close(); } }
/** * Creates lazy proxies for the {@code JMXConnector} and {@code MBeanServerConnection}. */ private void createLazyConnection() { this.connectorTargetSource = new JMXConnectorLazyInitTargetSource(); TargetSource connectionTargetSource = new MBeanServerConnectionLazyInitTargetSource(); this.connector = (JMXConnector) new ProxyFactory(JMXConnector.class, this.connectorTargetSource).getProxy(this.beanClassLoader); this.connection = (MBeanServerConnection) new ProxyFactory(MBeanServerConnection.class, connectionTargetSource).getProxy(this.beanClassLoader); }
/** * Closes the underlying {@code JMXConnector}. */ @Override public void destroy() throws IOException { if (this.connector != null && (this.connectorTargetSource == null || this.connectorTargetSource.isInitialized())) { this.connector.close(); } }
/** * Creates lazy proxies for the {@code JMXConnector} and {@code MBeanServerConnection}. */ private void createLazyConnection() { this.connectorTargetSource = new JMXConnectorLazyInitTargetSource(); TargetSource connectionTargetSource = new MBeanServerConnectionLazyInitTargetSource(); this.connector = (JMXConnector) new ProxyFactory(JMXConnector.class, this.connectorTargetSource).getProxy(this.beanClassLoader); this.connection = (MBeanServerConnection) new ProxyFactory(MBeanServerConnection.class, connectionTargetSource).getProxy(this.beanClassLoader); }
/** * Closes the underlying {@code JMXConnector}. */ @Override public void destroy() throws IOException { if (this.connector != null && (this.connectorTargetSource == null || this.connectorTargetSource.isInitialized())) { this.connector.close(); } }