01: package com.jamonapi;
02:
03: /** Null implementation of the Monitor interface. Null objects are discussed in Martin Fowler's refactoring book.
04: * This class is used when the MonitorFactory is disabled. So when the MonitorFactory is disabled resource usage
05: * is very low and performance is very fast.
06: *
07: * All methods have empty/do nothing implementations.
08: **/
09:
10: final public class NullMonitor extends BaseMonitor {
11: protected NullMonitor() {
12: // Do nothing
13: }
14:
15: public boolean isPrimary() {
16: return false;
17: }
18:
19: public void setPrimary(boolean primary) {
20: }
21: }
|