Package org.apache.tomcat

Examples of org.apache.tomcat.Valve


    public void setBasic(Valve valve) {

  // FIXME - Synchronize as necessary
  // FIXME - Lifecycle support (on old and new) if already started

  Valve oldBasic = this.basic;
  valve.setContainer((Container) this);
  valve.setNext(null);

  if (basic == null) {
      Valve previous = getLast();
      if (previous != null)
    previous.setNext(valve);
      valve.setPrevious(previous);
  } else {
      Valve previous = basic.getPrevious();
      if (previous != null)
    previous.setNext(valve);
      valve.setPrevious(previous);
      basic.setContainer(null);
      basic.setNext(null);
      basic.setPrevious(null);
      basic = valve;
View Full Code Here


     */
    public Valve getLast() {

  if (first == null)
      return (null);
  Valve next = first;
  while ((next.getNext() != null) && (next.getNext() != basic))
      next = next.getNext();
  return (next);

    }
View Full Code Here

      ((Lifecycle) realm).start();
  if ((resources != null) && (resources instanceof Lifecycle))
      ((Lifecycle) resources).start();

  // Start the Valves in our pipeline (including the basic), if any
  Valve current = first;
  while (current != null) {
      if (current instanceof Lifecycle)
    ((Lifecycle) current).start();
      current = current.getNext();
  }

    }
View Full Code Here

    (sm.getString("containerBase.notStarted"));
  started = false;
  fireLifecycleEvent(STOP_EVENT, null);

  // Stop the Valves in our pipeline (including the basic), if any
  Valve current = basic;
  if (current == null)
      current = getLast();
  while (current != null) {
      if (current instanceof Lifecycle)
    ((Lifecycle) current).stop();
      current = current.getPrevious();
  }

  // Stop our subordinate components, if any
  if ((resources != null) && (resources instanceof Lifecycle))
      ((Lifecycle) resources).stop();
View Full Code Here

  valve.setContainer((Container) this);
  valve.setNext(basic);

  if (basic == null) {
      Valve last = getLast();
      if (last == null) {
    valve.setPrevious(null);
    first = valve;
      } else {
    valve.setPrevious(last);
    last.setNext(valve);
      }
  } else {
      Valve previous = basic.getPrevious();
      if (previous == null) {
    valve.setPrevious(null);
    first = valve;
      } else {
    valve.setPrevious(previous);
    previous.setNext(valve);
      }
  }

  fireContainerEvent(ADD_VALVE_EVENT, valve);
View Full Code Here

  // FIXME - Synchronize as necessary
  // FIXME - Call valve.stop() if Lifecycle implemented and
  // this Container is already started

  Valve current = first;
  while (current != null) {
      if (current != valve) {
    current = current.getNext();
    continue;
      }
      Valve previous = current.getPrevious();
      Valve next = current.getNext();
      if (previous == null) {
    if (next == null) {
        first = null;
    } else {
        next.setPrevious(null);
        first = next;
    }
      } else {
    previous.setNext(next);
    if (next != null)
        next.setPrevious(previous);
      }
      fireContainerEvent(REMOVE_VALVE_EVENT, valve);
      break;
  }
View Full Code Here

TOP

Related Classes of org.apache.tomcat.Valve

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.