*/
public abstract class ContainerBase
- implements Container, Lifecycle, Pipeline, MBeanRegistration {
+ implements Container, Lifecycle, MBeanRegistration {
private static final org.apache.juli.logging.Log log=
org.apache.juli.logging.LogFactory.getLog( ContainerBase.class );
/**
- * Add a new Valve to the end of the pipeline associated with this
- * Container. Prior to adding the Valve, the Valve's
- * <code>setContainer</code> method must be called, with this Container
- * as an argument. The method may throw an
- * <code>IllegalArgumentException</code> if this Valve chooses not to
- * be associated with this Container, or <code>IllegalStateException</code>
- * if it is already associated with a different Container.
+ * Convenience method, intended for use by the digester to simplify the
+ * process of adding Valves to containers. See
+ * {@link Pipeline#addValve(Valve)} for full details. Components other than
+ * the digester should use {@link #getPipeline()#addValve(Valve)} in case a
+ * future implementation provides an alternative method for the digester to
+ * use.
*
* @param valve Valve to be added
*
public ObjectName[] getValveObjectNames() {
return ((StandardPipeline)pipeline).getValveObjectNames();
}
-
- /**
- * <p>Return the Valve instance that has been distinguished as the basic
- * Valve for this Pipeline (if any).
- */
- public Valve getBasic() {
-
- return (pipeline.getBasic());
-
- }
-
-
- /**
- * Return the first valve in the pipeline.
- */
- public Valve getFirst() {
-
- return (pipeline.getFirst());
-
- }
-
-
- /**
- * Return the set of Valves in the pipeline associated with this
- * Container, including the basic Valve (if any). If there are no
- * such Valves, a zero-length array is returned.
- */
- public Valve[] getValves() {
-
- return (pipeline.getValves());
-
- }
-
-
- /**
- * Remove the specified Valve from the pipeline associated with this
- * Container, if it is found; otherwise, do nothing.
- *
- * @param valve Valve to be removed
- */
- public synchronized void removeValve(Valve valve) {
-
- pipeline.removeValve(valve);
- }
-
-
- /**
- * <p>Set the Valve instance that has been distinguished as the basic
- * Valve for this Pipeline (if any). Prior to setting the basic Valve,
- * the Valve's <code>setContainer()</code> will be called, if it
- * implements <code>Contained</code>, with the owning Container as an
- * argument. The method may throw an <code>IllegalArgumentException</code>
- * if this Valve chooses not to be associated with this Container, or
- * <code>IllegalStateException</code> if it is already associated with
- * a different Container.</p>
- *
- * @param valve Valve to be distinguished as the basic Valve
- */
- public void setBasic(Valve valve) {
-
- pipeline.setBasic(valve);
-
- }
/**
}
-
- @Override
- public boolean isAsyncSupported() {
- return pipeline.isAsyncSupported();
- }
-
-
-
-
}
AccessLogValve accessLogger = new AccessLogValve();
ContainerBase containerBase = getParentContainerFromParent(pname);
// Add the new instance to its parent component
- containerBase.addValve(accessLogger);
+ containerBase.getPipeline().addValve(accessLogger);
ObjectName oname = accessLogger.getObjectName();
return (oname.toString());
// Add the new instance to its parent component
ObjectName pname = new ObjectName(parent);
ContainerBase containerBase = getParentContainerFromParent(pname);
- containerBase.addValve(valve);
+ containerBase.getPipeline().addValve(valve);
ObjectName oname = valve.getObjectName();
return (oname.toString());
// Add the new instance to its parent component
ObjectName pname = new ObjectName(parent);
ContainerBase containerBase = getParentContainerFromParent(pname);
- containerBase.addValve(valve);
+ containerBase.getPipeline().addValve(valve);
ObjectName oname = valve.getObjectName();
return (oname.toString());
// Add the new instance to its parent component
ObjectName pname = new ObjectName(parent);
ContainerBase containerBase = getParentContainerFromParent(pname);
- containerBase.addValve(valve);
+ containerBase.getPipeline().addValve(valve);
ObjectName oname = valve.getObjectName();
return (oname.toString());
for (int i = 0; i < valves.length; i++) {
ObjectName voname = ((ValveBase) valves[i]).getObjectName();
if (voname.equals(oname)) {
- container.removeValve(valves[i]);
+ container.getPipeline().removeValve(valves[i]);
}
}
}