Java 类org.apache.catalina.valves.ValveBase 实例源码

项目:tomcat7    文件:StandardPipeline.java   
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]);

    }
项目:lams    文件:StandardPipeline.java   
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 );
        }
    }
}
项目:lams    文件:StandardPipeline.java   
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]));

    }
项目:apache-tomcat-7.0.73-with-comment    文件:StandardPipeline.java   
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]);

    }
项目:lazycat    文件:StandardPipeline.java   
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]);

    }
项目:class-guard    文件:StandardPipeline.java   
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]);

    }
项目:apache-tomcat-7.0.57    文件:StandardPipeline.java   
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]);

    }
项目:apache-tomcat-7.0.57    文件:StandardPipeline.java   
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]);

    }
项目:WBSAirback    文件:StandardPipeline.java   
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]);

    }
项目:tomcat7    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:tomcat7    文件:StandardHost.java   
/**
  * 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;

 }
项目:lams    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:lams    文件:StandardPipeline.java   
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 );
            }
        }
    }
项目:lams    文件:StandardHost.java   
/**
  * 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;

 }
项目:apache-tomcat-7.0.73-with-comment    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:StandardHost.java   
/**
  * 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;

 }
项目:lazycat    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:lazycat    文件:StandardHost.java   
/**
 * 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;

}
项目:class-guard    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:class-guard    文件:StandardHost.java   
/**
  * 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;

 }
项目:apache-tomcat-7.0.57    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:apache-tomcat-7.0.57    文件:StandardHost.java   
/**
  * 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;

 }
项目:apache-tomcat-7.0.57    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:apache-tomcat-7.0.57    文件:StandardHost.java   
/**
  * 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;

 }
项目:WBSAirback    文件:MBeanFactory.java   
/**
 * 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]);
        }
    }
}
项目:WBSAirback    文件:StandardHost.java   
/**
  * 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;

 }
项目:flex-blazeds    文件:Tomcat7Valve.java   
TomcatLoginImpl(ValveBase valve, Request request)
{
    this.valve = valve;
    this.request = request;
}