public ObjectName getTopLevelName() { DeploymentContext top = getTopLevel(); if (top == null || top instanceof DeploymentMBean == false) return null; return ((DeploymentMBean) top).getObjectName(); }
public ObjectName getParentName() { DeploymentContext parent = getParent(); if (parent == null || parent instanceof DeploymentMBean == false) return null; return ((DeploymentMBean) parent).getObjectName(); }
public ObjectName getTopLevelName() { DeploymentContext top = getTopLevel(); if (top == null || top instanceof DeploymentMBean == false) return null; return ((DeploymentMBean) top).getObjectName(); }
public List<ObjectName> getChildNames() { List<DeploymentContext> children = getChildren(); List<ObjectName> result = new ArrayList<ObjectName>(); for (DeploymentContext child : children) { if (child instanceof DeploymentMBean) result.add(((DeploymentMBean) child).getObjectName()); } return result; }
public List<ObjectName> getComponentNames() { List<DeploymentContext> components = getComponents(); List<ObjectName> result = new ArrayList<ObjectName>(); for (DeploymentContext component : components) { if (component instanceof DeploymentMBean) result.add(((DeploymentMBean) component).getObjectName()); } return result; }
public List<ObjectName> getComponentNames() { List<DeploymentContext> components = getComponents(); List<ObjectName> result = new ArrayList<ObjectName>(); for (DeploymentContext component : components) { if (component instanceof DeploymentMBean) result.add(((DeploymentMBean) component).getObjectName()); } return result; }
public ObjectName getParentName() { DeploymentContext parent = getParent(); if (parent == null || parent instanceof DeploymentMBean == false) return null; return ((DeploymentMBean) parent).getObjectName(); }
/** * Unregister mbeans * * @param context the context * @param unregisterContext whether to unregister the context or just its children and components * @param unregisterSubDeployments whether to unregister subdeployments */ protected void unregisterMBeans(DeploymentContext context, boolean unregisterContext, boolean unregisterSubDeployments) { if (unregisterContext && context instanceof DeploymentMBean) { try { DeploymentMBean depMBean = (DeploymentMBean) context; server.unregisterMBean(depMBean.getObjectName()); } catch (Exception e) { log.trace("Unable to unregister deployment mbean " + context.getName(), e); } } if (unregisterSubDeployments) { List<DeploymentContext> components = context.getComponents(); for (DeploymentContext component : components) unregisterMBeans(component, false, false); } }
/** * Register mbeans * * @param context the context * @param registerContext whether to register the context or just its children and components * @param registerSubDeployments whether to register subdeployments */ protected void registerMBeans(DeploymentContext context, boolean registerContext, boolean registerSubDeployments) { if (registerContext && context instanceof DeploymentMBean) { try { DeploymentMBean depMBean = (DeploymentMBean) context; server.registerMBean(context, depMBean.getObjectName()); } catch (Exception e) { log.warn("Unable to register deployment mbean " + context.getName(), e); } } if (registerSubDeployments) { List<DeploymentContext> components = context.getComponents(); for (DeploymentContext component : components) registerMBeans(component, false, false); } }
server.unregisterMBean(depMBean.getObjectName());
server.registerMBean(context, depMBean.getObjectName());