@Override protected void destroyInternal() throws LifecycleException { super.destroyInternal(); }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); }
@Override protected String getDomainInternal() { if (service instanceof LifecycleMBeanBase) { return ((LifecycleMBeanBase) service).getDomain(); } else { return null; } }
/** * Sub-classes wishing to perform additional initialization should override * this method, ensuring that super.initInternal() is the first call in the * overriding method. */ @Override protected void initInternal() throws LifecycleException { // If oname is not null then registration has already happened via // preRegister(). if (oname == null) { mserver = Registry.getRegistry(null, null).getMBeanServer(); oname = register(this, getObjectNameKeyProperties()); } }
protected void initInternal() throws LifecycleException { super.initInternal(); ((LifecycleMBeanBase) executor).setDomain(getDomain());
/** * Sub-classes wishing to perform additional clean-up should override this * method, ensuring that super.destroyInternal() is the last call in the * overriding method. */ @Override protected void destroyInternal() throws LifecycleException { unregister(oname); }
/** * Obtain the domain under which this component will be / has been * registered. */ @Override public final String getDomain() { if (domain == null) { domain = getDomainInternal(); } if (domain == null) { domain = Globals.DEFAULT_MBEAN_DOMAIN; } return domain; }
/** * Create a new Valve and associate it with a {@link Container}. * * @param className The fully qualified class name of the {@link Valve} to * create * @param parent The MBean name of the associated parent * {@link Container}. * * @return The MBean name of the {@link Valve} that was created or * <code>null</code> if the {@link Valve} does not implement * {@link LifecycleMBeanBase}. */ public String createValve(String className, String parent) throws Exception { // Look for the parent ObjectName parentName = new ObjectName(parent); Container container = getParentContainerFromParent(parentName); if (container == null) { // TODO throw new IllegalArgumentException(); } Valve valve = (Valve) Class.forName(className).newInstance(); container.getPipeline().addValve(valve); if (valve instanceof LifecycleMBeanBase) { return ((LifecycleMBeanBase) valve).getObjectName().toString(); } else { return null; } }
/** * Sub-classes wishing to perform additional initialization should override * this method, ensuring that super.initInternal() is the first call in the * overriding method. */ @Override protected void initInternal() throws LifecycleException { // If oname is not null then registration has already happened via // preRegister(). if (oname == null) { mserver = Registry.getRegistry(null, null).getMBeanServer(); oname = register(this, getObjectNameKeyProperties()); } }
protected void initInternal() throws LifecycleException { super.initInternal(); ((LifecycleMBeanBase) executor).setDomain(getDomain());
/** * Sub-classes wishing to perform additional clean-up should override this * method, ensuring that super.destroyInternal() is the last call in the * overriding method. */ @Override protected void destroyInternal() throws LifecycleException { unregister(oname); }
/** * Obtain the domain under which this component will be / has been * registered. */ public final String getDomain() { if (domain == null) { domain = getDomainInternal(); } if (domain == null) { domain = Globals.DEFAULT_MBEAN_DOMAIN; } return domain; }
/** * Create a new Valve and associate it with a {@link Container}. * * @param className The fully qualified class name of the {@link Valve} to * create * @param parent The MBean name of the associated parent * {@link Container}. * * @return The MBean name of the {@link Valve} that was created or * <code>null</code> if the {@link Valve} does not implement * {@link LifecycleMBeanBase}. */ public String createValve(String className, String parent) throws Exception { // Look for the parent ObjectName parentName = new ObjectName(parent); Container container = getParentContainerFromParent(parentName); if (container == null) { // TODO throw new IllegalArgumentException(); } Valve valve = (Valve) Class.forName(className).newInstance(); container.getPipeline().addValve(valve); if (valve instanceof LifecycleMBeanBase) { return ((LifecycleMBeanBase) valve).getObjectName().toString(); } else { return null; } }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); // We want logger as soon as possible if (container != null) { this.containerLog = container.getLogger(); } }
@Override protected void destroyInternal() throws LifecycleException { super.destroyInternal(); }
/** * Sub-classes wishing to perform additional initialization should override * this method, ensuring that super.initInternal() is the first call in the * overriding method. */ @Override protected void initInternal() throws LifecycleException { // If oname is not null then registration has already happened via // preRegister(). if (oname == null) { mserver = Registry.getRegistry(null, null).getMBeanServer(); oname = register(this, getObjectNameKeyProperties()); } }
protected void initInternal() throws LifecycleException { super.initInternal(); ((LifecycleMBeanBase) executor).setDomain(getDomain());
@Override protected String getDomainInternal() { // Use the same domain as our associated container if we have one Object c = getContainer(); if (c instanceof LifecycleMBeanBase) { return ((LifecycleMBeanBase) c).getDomain(); } return null; }
/** * Sub-classes wishing to perform additional clean-up should override this * method, ensuring that super.destroyInternal() is the last call in the * overriding method. */ @Override protected void destroyInternal() throws LifecycleException { unregister(oname); }
/** * Obtain the domain under which this component will be / has been * registered. */ public final String getDomain() { if (domain == null) { domain = getDomainInternal(); } if (domain == null) { domain = Globals.DEFAULT_MBEAN_DOMAIN; } return domain; }