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


Java Pipeline.getValves方法代码示例

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


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

示例1: getAuthenticator

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
@Override
public Authenticator getAuthenticator() {
    if (this instanceof Authenticator)
        return (Authenticator) this;
    
    Pipeline pipeline = getPipeline();
    if (pipeline != null) {
        Valve basic = pipeline.getBasic();
        if ((basic != null) && (basic instanceof Authenticator))
            return (Authenticator) basic;
        Valve valves[] = pipeline.getValves();
        for (int i = 0; i < valves.length; i++) {
            if (valves[i] instanceof Authenticator)
                return (Authenticator) valves[i];
        }
    }
    return null;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:19,代码来源:StandardContext.java

示例2: getAuthenticator

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
@Override
public Authenticator getAuthenticator() {
	if (this instanceof Authenticator)
		return (Authenticator) this;

	Pipeline pipeline = getPipeline();
	if (pipeline != null) {
		Valve basic = pipeline.getBasic();
		if ((basic != null) && (basic instanceof Authenticator))
			return (Authenticator) basic;
		Valve valves[] = pipeline.getValves();
		for (int i = 0; i < valves.length; i++) {
			if (valves[i] instanceof Authenticator)
				return (Authenticator) valves[i];
		}
	}
	return null;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:19,代码来源:StandardContext.java

示例3: configureStart

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
/**
 * Process a "contextConfig" event for this Context.
 */
protected synchronized void configureStart() {
    // Called from StandardContext.start()

    if (log.isDebugEnabled())
        log.debug(sm.getString("contextConfig.start"));

    if (log.isDebugEnabled()) {
        log.debug(sm.getString("contextConfig.xmlSettings",
                context.getName(),
                Boolean.valueOf(context.getXmlValidation()),
                Boolean.valueOf(context.getXmlNamespaceAware())));
    }

    webConfig();

    if (!context.getIgnoreAnnotations()) {
        applicationAnnotationsConfig();
    }
    if (ok) {
        validateSecurityRoles();
    }

    // Configure an authenticator if we need one
    if (ok)
        authenticatorConfig();

    // Dump the contents of this pipeline if requested
    if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) {
        log.debug("Pipeline Configuration:");
        Pipeline pipeline = ((ContainerBase) context).getPipeline();
        Valve valves[] = null;
        if (pipeline != null)
            valves = pipeline.getValves();
        if (valves != null) {
            for (int i = 0; i < valves.length; i++) {
                log.debug("  " + valves[i].getInfo());
            }
        }
        log.debug("======================");
    }

    // Make our application available if no problems were encountered
    if (ok)
        context.setConfigured(true);
    else {
        log.error(sm.getString("contextConfig.unavailable"));
        context.setConfigured(false);
    }

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

示例4: getObjectNameKeyProperties

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
@Override
public String getObjectNameKeyProperties() {
    StringBuilder name = new StringBuilder("type=Valve");

    Container container = getContainer();

    name.append(MBeanUtils.getContainerKeyProperties(container));

    int seq = 0;

    // Pipeline may not be present in unit testing
    Pipeline p = container.getPipeline();
    if (p != null) {
        for (Valve valve : p.getValves()) {
            // Skip null valves
            if (valve == null) {
                continue;
            }
            // Only compare valves in pipeline until we find this valve
            if (valve == this) {
                break;
            }
            if (valve.getClass() == this.getClass()) {
                // Duplicate valve earlier in pipeline
                // increment sequence number
                seq ++;
            }
        }
    }

    if (seq > 0) {
        name.append(",seq=");
        name.append(seq);
    }

    String className = this.getClass().getName();
    int period = className.lastIndexOf('.');
    if (period >= 0) {
        className = className.substring(period + 1);
    }
    name.append(",name=");
    name.append(className);

    return name.toString();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:46,代码来源:ValveBase.java

示例5: start

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
/**
 * Process a "start" event for this Context.
 */
protected synchronized void start() {
    // Called from StandardContext.start()

    if (log.isDebugEnabled())
        log.debug(sm.getString("contextConfig.start"));

    // Set properties based on DefaultContext
    Container container = context.getParent();
    if( !context.getOverride() ) {
        if( container instanceof Host ) {
            // Reset the value only if the attribute wasn't
            // set on the context.
            xmlValidation = context.getXmlValidation();
            if (!xmlValidation) {
                xmlValidation = ((Host)container).getXmlValidation();
            }
            
            xmlNamespaceAware = context.getXmlNamespaceAware();
            if (!xmlNamespaceAware){
                xmlNamespaceAware 
                            = ((Host)container).getXmlNamespaceAware();
            }

            container = container.getParent();
        }
    }

    // Process the default and application web.xml files
    defaultWebConfig();
    applicationWebConfig();
    if (!context.getIgnoreAnnotations()) {
        applicationAnnotationsConfig();
    }
    if (ok) {
        validateSecurityRoles();
    }

    // Configure an authenticator if we need one
    if (ok)
        authenticatorConfig();

    // Dump the contents of this pipeline if requested
    if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) {
        log.debug("Pipeline Configuration:");
        Pipeline pipeline = ((ContainerBase) context).getPipeline();
        Valve valves[] = null;
        if (pipeline != null)
            valves = pipeline.getValves();
        if (valves != null) {
            for (int i = 0; i < valves.length; i++) {
                log.debug("  " + valves[i].getInfo());
            }
        }
        log.debug("======================");
    }

    // Make our application available if no problems were encountered
    if (ok)
        context.setConfigured(true);
    else {
        log.error(sm.getString("contextConfig.unavailable"));
        context.setConfigured(false);
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:69,代码来源:ContextConfig.java

示例6: start

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
/**
 * Process a "start" event for this Context.
 */
private synchronized void start() {

    if (debug > 0)
        log(sm.getString("contextConfig.start"));
    context.setConfigured(false);
    ok = true;

    // Set properties based on DefaultContext
    Container container = context.getParent();
    if( !context.getOverride() ) {
        if( container instanceof Host ) {
            ((Host)container).importDefaultContext(context);
            container = container.getParent();
        }
        if( container instanceof Engine ) {
            ((Engine)container).importDefaultContext(context);
        }
    }

    // Process the default and application web.xml files
    defaultConfig();
    applicationConfig();
    if (ok) {
        validateSecurityRoles();
    }

    // Scan tag library descriptor files for additional listener classes
    if (ok) {
        try {
            tldScan();
        } catch (Exception e) {
            log(e.getMessage(), e);
            ok = false;
        }
    }

    // Configure a certificates exposer valve, if required
    if (ok)
        certificatesConfig();

    // Configure an authenticator if we need one
    if (ok)
        authenticatorConfig();

    // Dump the contents of this pipeline if requested
    if ((debug >= 1) && (context instanceof ContainerBase)) {
        log("Pipline Configuration:");
        Pipeline pipeline = ((ContainerBase) context).getPipeline();
        Valve valves[] = null;
        if (pipeline != null)
            valves = pipeline.getValves();
        if (valves != null) {
            for (int i = 0; i < valves.length; i++) {
                log("  " + valves[i].getInfo());
            }
        }
        log("======================");
    }

    // Make our application available if no problems were encountered
    if (ok)
        context.setConfigured(true);
    else {
        log(sm.getString("contextConfig.unavailable"));
        context.setConfigured(false);
    }

}
 
开发者ID:c-rainstorm,项目名称:jerrydog,代码行数:72,代码来源:ContextConfig.java

示例7: configureStart

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
/**
 * Process a "contextConfig" event for this Context.
 */
protected synchronized void configureStart() {
	// Called from StandardContext.start()

	if (log.isDebugEnabled())
		log.debug(sm.getString("contextConfig.start"));

	if (log.isDebugEnabled()) {
		log.debug(sm.getString("contextConfig.xmlSettings", context.getName(),
				Boolean.valueOf(context.getXmlValidation()), Boolean.valueOf(context.getXmlNamespaceAware())));
	}

	webConfig();

	if (!context.getIgnoreAnnotations()) {
		applicationAnnotationsConfig();
	}
	if (ok) {
		validateSecurityRoles();
	}

	// Configure an authenticator if we need one
	if (ok)
		authenticatorConfig();

	// Dump the contents of this pipeline if requested
	if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) {
		log.debug("Pipeline Configuration:");
		Pipeline pipeline = ((ContainerBase) context).getPipeline();
		Valve valves[] = null;
		if (pipeline != null)
			valves = pipeline.getValves();
		if (valves != null) {
			for (int i = 0; i < valves.length; i++) {
				log.debug("  " + valves[i].getInfo());
			}
		}
		log.debug("======================");
	}

	// Make our application available if no problems were encountered
	if (ok)
		context.setConfigured(true);
	else {
		log.error(sm.getString("contextConfig.unavailable"));
		context.setConfigured(false);
	}

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

示例8: getObjectNameKeyProperties

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
@Override
public String getObjectNameKeyProperties() {
	StringBuilder name = new StringBuilder("type=Valve");

	Container container = getContainer();

	name.append(MBeanUtils.getContainerKeyProperties(container));

	int seq = 0;

	// Pipeline may not be present in unit testing
	Pipeline p = container.getPipeline();
	if (p != null) {
		for (Valve valve : p.getValves()) {
			// Skip null valves
			if (valve == null) {
				continue;
			}
			// Only compare valves in pipeline until we find this valve
			if (valve == this) {
				break;
			}
			if (valve.getClass() == this.getClass()) {
				// Duplicate valve earlier in pipeline
				// increment sequence number
				seq++;
			}
		}
	}

	if (seq > 0) {
		name.append(",seq=");
		name.append(seq);
	}

	String className = this.getClass().getName();
	int period = className.lastIndexOf('.');
	if (period >= 0) {
		className = className.substring(period + 1);
	}
	name.append(",name=");
	name.append(className);

	return name.toString();
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:46,代码来源:ValveBase.java

示例9: configureStart

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
/**
 * Process a "contextConfig" event for this Context.
 */
protected synchronized void configureStart() {
    // Called from StandardContext.start()

    if (log.isDebugEnabled())
        log.debug(sm.getString("contextConfig.start"));

    if (log.isDebugEnabled()) {
        log.debug(sm.getString("contextConfig.xmlSettings",
                context.getName(),
                Boolean.valueOf(context.getXmlValidation()),
                Boolean.valueOf(context.getXmlNamespaceAware())));
    }
    
    webConfig();

    if (!context.getIgnoreAnnotations()) {
        applicationAnnotationsConfig();
    }
    if (ok) {
        validateSecurityRoles();
    }

    // Configure an authenticator if we need one
    if (ok)
        authenticatorConfig();

    // Dump the contents of this pipeline if requested
    if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) {
        log.debug("Pipeline Configuration:");
        Pipeline pipeline = ((ContainerBase) context).getPipeline();
        Valve valves[] = null;
        if (pipeline != null)
            valves = pipeline.getValves();
        if (valves != null) {
            for (int i = 0; i < valves.length; i++) {
                log.debug("  " + valves[i].getInfo());
            }
        }
        log.debug("======================");
    }

    // Make our application available if no problems were encountered
    if (ok)
        context.setConfigured(true);
    else {
        log.error(sm.getString("contextConfig.unavailable"));
        context.setConfigured(false);
    }

}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:54,代码来源:ContextConfig.java

示例10: getObjectNameKeyProperties

import org.apache.catalina.Pipeline; //导入方法依赖的package包/类
@Override
public String getObjectNameKeyProperties() {
    StringBuilder name = new StringBuilder("type=Valve");
    
    Container container = getContainer();

    name.append(MBeanUtils.getContainerKeyProperties(container));
    
    int seq = 0;
    
    // Pipeline may not be present in unit testing
    Pipeline p = container.getPipeline();
    if (p != null) {
        for (Valve valve : p.getValves()) {
            // Skip null valves
            if (valve == null) {
                continue;
            }
            // Only compare valves in pipeline until we find this valve
            if (valve == this) {
                break;
            }
            if (valve.getClass() == this.getClass()) {
                // Duplicate valve earlier in pipeline
                // increment sequence number
                seq ++;
            }
        }
    }
    
    if (seq > 0) {
        name.append(",seq=");
        name.append(seq);
    }

    String className = this.getClass().getName();
    int period = className.lastIndexOf('.');
    if (period >= 0) {
        className = className.substring(period + 1);
    }
    name.append(",name=");
    name.append(className);
    
    return name.toString();
}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:46,代码来源:ValveBase.java


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