internal ICollection <T> GetProxiesFor <T>(Type beanInterface, KernelBean kernel) { beanInterface = typeof(T); ICollection <T> result = new List <T>(); ObjectName query = CreateObjectNameQuery(kernel.InstanceId, beanInterface); foreach (ObjectName name in MBeanServer.queryNames(query, null)) { result.Add(MakeProxy(kernel, name, beanInterface)); } return(result); }
public override void Start() { _support = ManagementSupport.Load(); _mbs = _support.MBeanServer; _beans = new LinkedList <Neo4jMBean>(); try { Neo4jMBean bean = new KernelBean(_kernelData, _dataSourceManager, _support); _mbs.registerMBean(bean, bean.ObjectName); _beans.Add(bean); } catch (Exception) { _log.info("Failed to register Kernel JMX Bean"); } foreach (ManagementBeanProvider provider in Service.load(typeof(ManagementBeanProvider))) { try { foreach (Neo4jMBean bean in provider.LoadBeans(_kernelData, _support)) { _mbs.registerMBean(bean, bean.ObjectName); _beans.Add(bean); } } catch (Exception e) { _log.info("Failed to register JMX Bean " + provider + " (" + e + ")"); } } try { Neo4jMBean bean = new ConfigurationBean(_kernelData, _support); _mbs.registerMBean(bean, bean.ObjectName); _beans.Add(bean); } catch (Exception) { _log.info("Failed to register Configuration JMX Bean"); } }
/// <summary> /// Create a proxy for the specified bean. /// </summary> /// @param <T> The type of the bean to create. </param> /// <param name="kernel"> the kernel that the proxy should be created for. </param> /// <param name="beanInterface"> the bean type to create the proxy for. </param> /// <returns> a new proxy for the specified bean. </returns> protected internal virtual T MakeProxy <T>(KernelBean kernel, ObjectName name, Type beanInterface) { beanInterface = typeof(T); throw new System.NotSupportedException("Cannot create management bean proxies."); }
public DataSourceInfo(KernelBean outerInstance) { this._outerInstance = outerInstance; }