当前位置: 首页>>代码示例>>Java>>正文


Java Engine.getName方法代码示例

本文整理汇总了Java中org.apache.catalina.Engine.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Engine.getName方法的具体用法?Java Engine.getName怎么用?Java Engine.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.catalina.Engine的用法示例。


在下文中一共展示了Engine.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: destroyMBean

import org.apache.catalina.Engine; //导入方法依赖的package包/类
/**
 * Deregister the MBean for this
 * <code>Engine</code> object.
 *
 * @param engine The Engine to be managed
 *
 * @exception Exception if an MBean cannot be deregistered
 *
 * @deprecated  Unused. Will be removed in Tomcat 8.0.x
 */
@Deprecated
static void destroyMBean(Engine engine)
    throws Exception {
    String domain = engine.getName();
    if (domain == null)
        domain = mserver.getDefaultDomain();
    ObjectName oname = createObjectName(domain, engine);
    if( mserver.isRegistered(oname) )
        mserver.unregisterMBean(oname);

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:MBeanUtils.java

示例2: start

import org.apache.catalina.Engine; //导入方法依赖的package包/类
@Override
public void start() throws Exception {
    if (started)
        return;
    Container hcontainer = getCluster().getContainer();
    if(!(hcontainer instanceof Host)) {
        log.error(sm.getString("farmWarDeployer.hostOnly"));
        return ;
    }
    host = (Host) hcontainer;

    // Check to correct engine and host setup
    Container econtainer = host.getParent();
    if(!(econtainer instanceof Engine)) {
        log.error(sm.getString("farmWarDeployer.hostParentEngine",
                host.getName())); 
        return ;
    }
    Engine engine = (Engine) econtainer;
    String hostname = null;
    hostname = host.getName();
    try {
        oname = new ObjectName(engine.getName() + ":type=Deployer,host="
                + hostname);
    } catch (Exception e) {
        log.error(sm.getString("farmWarDeployer.mbeanNameFail",
                engine.getName(), hostname),e);
        return;
    }
    if (watchEnabled) {
        watcher = new WarWatcher(this, getWatchDirFile());
        if (log.isInfoEnabled()) {
            log.info(sm.getString(
                    "farmWarDeployer.watchDir", getWatchDir()));
        }
    }

    if (host.getXmlBase()!=null) {
        configBase = getAbsolutePath(host.getXmlBase());
    } else {
        StringBuilder xmlDir = new StringBuilder("conf");
        xmlDir.append('/');
        xmlDir.append(engine.getName());
        xmlDir.append('/');
        xmlDir.append(host.getName());
        configBase = getAbsolutePath(xmlDir.toString());
    }

    // Retrieve the MBean server
    mBeanServer = Registry.getRegistry(null, null).getMBeanServer();

    started = true;
    count = 0;

    getCluster().addClusterListener(this);

    if (log.isInfoEnabled())
        log.info(sm.getString("farmWarDeployer.started"));
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:60,代码来源:FarmWarDeployer.java

示例3: start

import org.apache.catalina.Engine; //导入方法依赖的package包/类
@Override
public void start() throws Exception {
	if (started)
		return;
	Container hcontainer = getCluster().getContainer();
	if (!(hcontainer instanceof Host)) {
		log.error(sm.getString("farmWarDeployer.hostOnly"));
		return;
	}
	host = (Host) hcontainer;

	// Check to correct engine and host setup
	Container econtainer = host.getParent();
	if (!(econtainer instanceof Engine)) {
		log.error(sm.getString("farmWarDeployer.hostParentEngine", host.getName()));
		return;
	}
	Engine engine = (Engine) econtainer;
	String hostname = null;
	hostname = host.getName();
	try {
		oname = new ObjectName(engine.getName() + ":type=Deployer,host=" + hostname);
	} catch (Exception e) {
		log.error(sm.getString("farmWarDeployer.mbeanNameFail", engine.getName(), hostname), e);
		return;
	}
	if (watchEnabled) {
		watcher = new WarWatcher(this, getWatchDirFile());
		if (log.isInfoEnabled()) {
			log.info(sm.getString("farmWarDeployer.watchDir", getWatchDir()));
		}
	}

	if (host.getXmlBase() != null) {
		configBase = getAbsolutePath(host.getXmlBase());
	} else {
		StringBuilder xmlDir = new StringBuilder("conf");
		xmlDir.append('/');
		xmlDir.append(engine.getName());
		xmlDir.append('/');
		xmlDir.append(host.getName());
		configBase = getAbsolutePath(xmlDir.toString());
	}

	// Retrieve the MBean server
	mBeanServer = Registry.getRegistry(null, null).getMBeanServer();

	started = true;
	count = 0;

	getCluster().addClusterListener(this);

	if (log.isInfoEnabled())
		log.info(sm.getString("farmWarDeployer.started"));
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:56,代码来源:FarmWarDeployer.java

示例4: destroyMBean

import org.apache.catalina.Engine; //导入方法依赖的package包/类
/**
 * Deregister the MBean for this <code>Engine</code> object.
 *
 * @param engine
 *            The Engine to be managed
 *
 * @exception Exception
 *                if an MBean cannot be deregistered
 *
 * @deprecated Unused. Will be removed in Tomcat 8.0.x
 */
@Deprecated
static void destroyMBean(Engine engine) throws Exception {
	String domain = engine.getName();
	if (domain == null)
		domain = mserver.getDefaultDomain();
	ObjectName oname = createObjectName(domain, engine);
	if (mserver.isRegistered(oname))
		mserver.unregisterMBean(oname);

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:22,代码来源:MBeanUtils.java


注:本文中的org.apache.catalina.Engine.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。