當前位置: 首頁>>代碼示例>>Java>>正文


Java Host.findChildren方法代碼示例

本文整理匯總了Java中org.apache.catalina.Host.findChildren方法的典型用法代碼示例。如果您正苦於以下問題:Java Host.findChildren方法的具體用法?Java Host.findChildren怎麽用?Java Host.findChildren使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.catalina.Host的用法示例。


在下文中一共展示了Host.findChildren方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerHost

import org.apache.catalina.Host; //導入方法依賴的package包/類
/**
 * Register host.
 */
private void registerHost(Host host) {

    String[] aliases = host.findAliases();
    mapper.addHost(host.getName(), aliases, host);

    for (Container container : host.findChildren()) {
        if (container.getState().isAvailable()) {
            registerContext((Context) container);
        }
    }
    if(log.isDebugEnabled()) {
        log.debug(sm.getString("mapperListener.registerHost",
                host.getName(), domain, connector));
    }
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:19,代碼來源:MapperListener.java

示例2: createMBeans

import org.apache.catalina.Host; //導入方法依賴的package包/類
/**
 * Create the MBeans for the specified Host and its nested components.
 *
 * @param host Host for which to create MBeans
 *
 * @exception Exception if an exception is thrown during MBean creation
 */
protected void createMBeans(Host host) throws Exception {

    // Create the MBean for the Host itself
    if (log.isDebugEnabled()) {
        log.debug("Creating MBean for Host " + host);
    }
    //MBeanUtils.createMBean(host);
    host.addContainerListener(this);
    if (host instanceof StandardHost) {
        ((StandardHost) host).addPropertyChangeListener(this);
    }

    // Create the MBeans for the associated nested components
    Realm eRealm = host.getParent().getRealm();
    Realm hRealm = host.getRealm();
    if ((hRealm != null) && (hRealm != eRealm)) {
        if (log.isDebugEnabled())
            log.debug("Creating MBean for Realm " + hRealm);
        //MBeanUtils.createMBean(hRealm);
    }

    // Create the MBeans for each child Context
    Container contexts[] = host.findChildren();
    for (int k = 0; k < contexts.length; k++) {
        createMBeans((Context) contexts[k]);
    }

}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:36,代碼來源:ServerLifecycleListener.java

示例3: destroyMBeans

import org.apache.catalina.Host; //導入方法依賴的package包/類
/**
 * Deregister the MBeans for the specified Host and its nested components.
 *
 * @param host Host for which to destroy MBeans
 *
 * @exception Exception if an exception is thrown during MBean destruction
 */
protected void destroyMBeans(Host host) throws Exception {

    // Deregister ourselves as a ContainerListener
    host.removeContainerListener(this);

    // Deregister the MBeans for each child Context
    Container contexts[] = host.findChildren();
    for (int k = 0; k < contexts.length; k++) {
        destroyMBeans((Context) contexts[k]);
    }


    // Deregister the MBeans for the associated nested components
    Realm eRealm = host.getParent().getRealm();
    Realm hRealm = host.getRealm();
    if ((hRealm != null) && (hRealm != eRealm)) {
        if (log.isDebugEnabled())
            log.debug("Destroying MBean for Realm " + hRealm);
        //MBeanUtils.destroyMBean(hRealm);
    }

    // Deregister the MBean for the Host itself
    if (log.isDebugEnabled()) {
        log.debug("Destroying MBean for Host " + host);
    }
    //MBeanUtils.destroyMBean(host);

}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:36,代碼來源:ServerLifecycleListener.java

示例4: registerHost

import org.apache.catalina.Host; //導入方法依賴的package包/類
/**
 * Register host.
 */
private void registerHost(Host host) {

	String[] aliases = host.findAliases();
	mapper.addHost(host.getName(), aliases, host);

	for (Container container : host.findChildren()) {
		if (container.getState().isAvailable()) {
			registerContext((Context) container);
		}
	}
	if (log.isDebugEnabled()) {
		log.debug(sm.getString("mapperListener.registerHost", host.getName(), domain, connector));
	}
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:18,代碼來源:MapperListener.java

示例5: registerListenersForHost

import org.apache.catalina.Host; //導入方法依賴的package包/類
private void registerListenersForHost(Host host) {
    for (Container contextContainer : host.findChildren()) {
        Context context = (Context) contextContainer;
        registerContextListener(context);
    }
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:7,代碼來源:ThreadLocalLeakPreventionListener.java

示例6: createMBeans

import org.apache.catalina.Host; //導入方法依賴的package包/類
/**
 * Create the MBeans for the specified Host and its nested components.
 *
 * @param host Host for which to create MBeans
 *
 * @exception Exception if an exception is thrown during MBean creation
 */
protected void createMBeans(Host host) throws Exception {

    // Create the MBean for the Host itself
    if (debug >= 3) {
        log("Creating MBean for Host " + host);
    }
    MBeanUtils.createMBean(host);
    host.addContainerListener(this);
    if (host instanceof StandardHost) {
        ((StandardHost) host).addPropertyChangeListener(this);
    }

    // Create the MBeans for the associated nested components
    Logger eLogger = host.getParent().getLogger();
    Logger hLogger = host.getLogger();
    if ((hLogger != null) && (hLogger != eLogger)) {
        if (debug >= 3)
            log("Creating MBean for Logger " + hLogger);
        MBeanUtils.createMBean(hLogger);
    }
    Realm eRealm = host.getParent().getRealm();
    Realm hRealm = host.getRealm();
    if ((hRealm != null) && (hRealm != eRealm)) {
        if (debug >= 3)
            log("Creating MBean for Realm " + hRealm);
        MBeanUtils.createMBean(hRealm);
    }

    // Create the MBeans for the associated Valves
    if (host instanceof StandardHost) {
        Valve hValves[] = ((StandardHost)host).getValves();
        for (int k = 0; k < hValves.length; k++) {
            if (debug >= 3)
                log("Creating MBean for Valve " + hValves[k]);
            MBeanUtils.createMBean(hValves[k]);
        }
    }

    // Create the MBeans for each child Context
    Container contexts[] = host.findChildren();
    for (int k = 0; k < contexts.length; k++) {
        createMBeans((Context) contexts[k]);
    }

    // Create the MBeans for DefaultContext
    DefaultContext dcontext = host.getDefaultContext();
    if (dcontext != null) {
        dcontext.setParent(host);
        createMBeans(dcontext);
    }

}
 
開發者ID:c-rainstorm,項目名稱:jerrydog,代碼行數:60,代碼來源:ServerLifecycleListener.java

示例7: destroyMBeans

import org.apache.catalina.Host; //導入方法依賴的package包/類
/**
 * Deregister the MBeans for the specified Host and its nested components.
 *
 * @param host Host for which to destroy MBeans
 *
 * @exception Exception if an exception is thrown during MBean destruction
 */
protected void destroyMBeans(Host host) throws Exception {

    // Deregister ourselves as a ContainerListener
    host.removeContainerListener(this);

    // Deregister the MBeans for each child Context
    Container contexts[] = host.findChildren();
    for (int k = 0; k < contexts.length; k++) {
        destroyMBeans((Context) contexts[k]);
    }

    // Deregister the MBeans for the associated Valves
    if (host instanceof StandardHost) {
        Valve hValves[] = ((StandardHost)host).getValves();
        for (int k = 0; k < hValves.length; k++) {
            if (debug >= 3)
                log("Destroying MBean for Valve " + hValves[k]);
            MBeanUtils.destroyMBean(hValves[k], host);
        }
    }

    // Deregister the MBeans for the associated nested components
    Realm eRealm = host.getParent().getRealm();
    Realm hRealm = host.getRealm();
    if ((hRealm != null) && (hRealm != eRealm)) {
        if (debug >= 3)
            log("Destroying MBean for Realm " + hRealm);
        MBeanUtils.destroyMBean(hRealm);
    }
    Logger eLogger = host.getParent().getLogger();
    Logger hLogger = host.getLogger();
    if ((hLogger != null) && (hLogger != eLogger)) {
        if (debug >= 3)
            log("Destroying MBean for Logger " + hLogger);
        MBeanUtils.destroyMBean(hLogger);
    }

    // Deregister the MBean for the Host itself
    if (debug >= 3) {
        log("Destroying MBean for Host " + host);
    }
    MBeanUtils.destroyMBean(host);

}
 
開發者ID:c-rainstorm,項目名稱:jerrydog,代碼行數:52,代碼來源:ServerLifecycleListener.java

示例8: registerListenersForHost

import org.apache.catalina.Host; //導入方法依賴的package包/類
private void registerListenersForHost(Host host) {
	for (Container contextContainer : host.findChildren()) {
		Context context = (Context) contextContainer;
		registerContextListener(context);
	}
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:7,代碼來源:ThreadLocalLeakPreventionListener.java


注:本文中的org.apache.catalina.Host.findChildren方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。