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


Java ValveBase类代码示例

本文整理汇总了Java中org.apache.catalina.valves.ValveBase的典型用法代码示例。如果您正苦于以下问题:Java ValveBase类的具体用法?Java ValveBase怎么用?Java ValveBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getValveObjectNames

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
public ObjectName[] getValveObjectNames() {

        ArrayList<ObjectName> valveList = new ArrayList<ObjectName>();
        Valve current = first;
        if (current == null) {
            current = basic;
        }
        while (current != null) {
            if (current instanceof ValveBase) {
                valveList.add(((ValveBase) current).getObjectName());
            }
            current = current.getNext();
        }

        return valveList.toArray(new ObjectName[0]);

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

示例2: unregisterValve

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
private void unregisterValve(Valve valve) {
    if( valve instanceof ValveBase ) {
        try {
            ValveBase vb=(ValveBase)valve;
            if( vb.getController()!=null &&
                    vb.getController() == 
                    ((ContainerBase)container).getJmxName() ) {
                
                ObjectName vname=vb.getObjectName();
                Registry.getRegistry(null, null).getMBeanServer()
                    .unregisterMBean(vname);
                ((ValveBase)valve).setObjectName(null);
            }
        } catch( Throwable t ) {
            log.info( "Can't unregister valve " + valve , t );
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:StandardPipeline.java

示例3: getValveObjectNames

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
public ObjectName[] getValveObjectNames() {

    	ArrayList valveList = new ArrayList();
        Valve current = first;
        if (current == null) {
        	current = basic;
        }
        while (current != null) {
        	if (current instanceof ValveBase) {
        		valveList.add(((ValveBase) current).getObjectName());
        	}
        	current = current.getNext();
        }

        return ((ObjectName[]) valveList.toArray(new ObjectName[0]));

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

示例4: getValveObjectNames

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
public ObjectName[] getValveObjectNames() {

		ArrayList<ObjectName> valveList = new ArrayList<ObjectName>();
		Valve current = first;
		if (current == null) {
			current = basic;
		}
		while (current != null) {
			if (current instanceof ValveBase) {
				valveList.add(((ValveBase) current).getObjectName());
			}
			current = current.getNext();
		}

		return valveList.toArray(new ObjectName[0]);

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

示例5: removeValve

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
/**
 * Remove an existing Valve.
 *
 * @param name MBean Name of the component to remove
 *
 * @exception Exception if a component cannot be removed
 */
public void removeValve(String name) throws Exception {

    // Acquire a reference to the component to be removed
    ObjectName oname = new ObjectName(name);
    ContainerBase container = getParentContainerFromChild(oname);
    Valve[] valves = container.getPipeline().getValves();
    for (int i = 0; i < valves.length; i++) {
        ObjectName voname = ((ValveBase) valves[i]).getObjectName();
        if (voname.equals(oname)) {
            container.getPipeline().removeValve(valves[i]);
        }
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:21,代码来源:MBeanFactory.java

示例6: getValveNames

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
/**
  * Return the MBean Names of the Valves associated with this Host
  *
  * @exception Exception if an MBean cannot be created or registered
  */
 public String [] getValveNames()
     throws Exception
{
     Valve [] valves = this.getPipeline().getValves();
     String [] mbeanNames = new String[valves.length];
     for (int i = 0; i < valves.length; i++) {
         if( valves[i] == null ) continue;
         if( ((ValveBase)valves[i]).getObjectName() == null ) continue;
         mbeanNames[i] = ((ValveBase)valves[i]).getObjectName().toString();
     }

     return mbeanNames;

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

示例7: removeValve

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
/**
 * Remove an existing Valve.
 *
 * @param name MBean Name of the comonent to remove
 *
 * @exception Exception if a component cannot be removed
 */
public void removeValve(String name) throws Exception {

    // Acquire a reference to the component to be removed
    ObjectName oname = new ObjectName(name);
    ContainerBase container = getParentContainerFromChild(oname);
    String sequence = oname.getKeyProperty("seq");
    Valve[] valves = (Valve[])container.getValves();
    for (int i = 0; i < valves.length; i++) {
        ObjectName voname = ((ValveBase) valves[i]).getObjectName();
        if (voname.equals(oname)) {
            container.removeValve(valves[i]);
        }
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:MBeanFactory.java

示例8: registerValve

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
private void registerValve(Valve valve) {

        if( valve instanceof ValveBase &&
                ((ValveBase)valve).getObjectName()==null ) {
            try {
                
                String domain=((ContainerBase)container).getDomain();
                if( container instanceof StandardContext ) {
                    domain=((StandardContext)container).getEngineName();
                }
                if( container instanceof StandardWrapper) {
                    Container ctx=((StandardWrapper)container).getParent();
                    domain=((StandardContext)ctx).getEngineName();
                }
                ObjectName vname=((ValveBase)valve).createObjectName(
                        domain,
                        ((ContainerBase)container).getJmxName());
                if( vname != null ) {
                    ((ValveBase)valve).setObjectName(vname);
                    Registry.getRegistry(null, null).registerComponent
                        (valve, vname, valve.getClass().getName());
                    ((ValveBase)valve).setController
                        (((ContainerBase)container).getJmxName());
                }
            } catch( Throwable t ) {
                log.info( "Can't register valve " + valve , t );
            }
        }
    }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:30,代码来源:StandardPipeline.java

示例9: getValveNames

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
/**
  * Return the MBean Names of the Valves assoicated with this Host
  *
  * @exception Exception if an MBean cannot be created or registered
  */
 public String [] getValveNames()
     throws Exception
{
     Valve [] valves = this.getValves();
     String [] mbeanNames = new String[valves.length];
     for (int i = 0; i < valves.length; i++) {
         if( valves[i] == null ) continue;
         if( ((ValveBase)valves[i]).getObjectName() == null ) continue;
         mbeanNames[i] = ((ValveBase)valves[i]).getObjectName().toString();
     }

     return mbeanNames;

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

示例10: removeValve

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
/**
 * Remove an existing Valve.
 *
 * @param name
 *            MBean Name of the component to remove
 *
 * @exception Exception
 *                if a component cannot be removed
 */
public void removeValve(String name) throws Exception {

	// Acquire a reference to the component to be removed
	ObjectName oname = new ObjectName(name);
	ContainerBase container = getParentContainerFromChild(oname);
	Valve[] valves = container.getPipeline().getValves();
	for (int i = 0; i < valves.length; i++) {
		ObjectName voname = ((ValveBase) valves[i]).getObjectName();
		if (voname.equals(oname)) {
			container.getPipeline().removeValve(valves[i]);
		}
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:23,代码来源:MBeanFactory.java

示例11: getValveNames

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
/**
 * Return the MBean Names of the Valves associated with this Host
 *
 * @exception Exception
 *                if an MBean cannot be created or registered
 */
public String[] getValveNames() throws Exception {
	Valve[] valves = this.getPipeline().getValves();
	String[] mbeanNames = new String[valves.length];
	for (int i = 0; i < valves.length; i++) {
		if (valves[i] == null)
			continue;
		if (((ValveBase) valves[i]).getObjectName() == null)
			continue;
		mbeanNames[i] = ((ValveBase) valves[i]).getObjectName().toString();
	}

	return mbeanNames;

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

示例12: TomcatLoginImpl

import org.apache.catalina.valves.ValveBase; //导入依赖的package包/类
TomcatLoginImpl(ValveBase valve, Request request)
{
    this.valve = valve;
    this.request = request;
}
 
开发者ID:apache,项目名称:flex-blazeds,代码行数:6,代码来源:Tomcat7Valve.java


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