Convenience base class for implementations of the Valve interface. A subclass MUST implement an invoke() method to provide the required functionality, and MAY implement the Lifecycle interface to provide configuration management and
| 33 | * <code>Lifecycle</code> interface to provide configuration management and lifecycle support. |
| 34 | */ |
| 35 | public abstract class ValveBase extends LifecycleMBeanBase implements Contained, Valve { |
| 36 | |
| 37 | /** |
| 38 | * StringManager for internationalized strings. |
| 39 | */ |
| 40 | protected static final StringManager sm = StringManager.getManager(ValveBase.class); |
| 41 | |
| 42 | |
| 43 | // ------------------------------------------------------ Constructor |
| 44 | |
| 45 | /** |
| 46 | * Constructs a new ValveBase with async support disabled. |
| 47 | */ |
| 48 | public ValveBase() { |
| 49 | this(false); |
| 50 | } |
| 51 | |
| 52 | |
| 53 | /** |
| 54 | * Constructs a new ValveBase. |
| 55 | * |
| 56 | * @param asyncSupported Whether this valve supports async requests |
| 57 | */ |
| 58 | public ValveBase(boolean asyncSupported) { |
| 59 | this.asyncSupported = asyncSupported; |
| 60 | } |
| 61 | |
| 62 | |
| 63 | // ------------------------------------------------------ Instance Variables |
| 64 | |
| 65 | /** |
| 66 | * Does this valve support Servlet 3+ async requests? |
| 67 | */ |
| 68 | protected boolean asyncSupported; |
| 69 | |
| 70 | |
| 71 | /** |
| 72 | * The Container whose pipeline this Valve is a component of. |
| 73 | */ |
| 74 | protected Container container = null; |
| 75 | |
| 76 | |
| 77 | /** |
| 78 | * Container log |
| 79 | */ |
| 80 | protected Log containerLog = null; |
| 81 | |
| 82 | |
| 83 | /** |
| 84 | * The next Valve in the pipeline this Valve is a component of. |
| 85 | */ |
| 86 | protected Valve next = null; |
| 87 | |
| 88 | |
| 89 | // -------------------------------------------------------------- Properties |
| 90 | |
| 91 | @Override |
| 92 | public Container getContainer() { |
nothing calls this directly
no test coverage detected