Package: trapperkeeper-webserver-jetty9-clojure / 1.7.0-2

0004-Implement-LifeCycle-methods-missing-from-RequestLogI.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From: Apollon Oikonomopoulos <apoikos@debian.org>
Date: Fri, 8 Feb 2019 00:38:26 +0200
Subject: Implement LifeCycle methods missing from RequestLogImpl

For some reason, our version of logback-access lacks some of Jetty 9.4's
LifeCycle methods. Implement them locally until we figure out what's
happening with the logback package.
---
 .../utils/LifeCycleImplementingRequestLogImpl.java | 37 +++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/java/com/puppetlabs/trapperkeeper/services/webserver/jetty9/utils/LifeCycleImplementingRequestLogImpl.java b/java/com/puppetlabs/trapperkeeper/services/webserver/jetty9/utils/LifeCycleImplementingRequestLogImpl.java
index c29363a..019cdcf 100644
--- a/java/com/puppetlabs/trapperkeeper/services/webserver/jetty9/utils/LifeCycleImplementingRequestLogImpl.java
+++ b/java/com/puppetlabs/trapperkeeper/services/webserver/jetty9/utils/LifeCycleImplementingRequestLogImpl.java
@@ -29,4 +29,39 @@ import org.eclipse.jetty.util.component.LifeCycle;
 
  */
 
-public class LifeCycleImplementingRequestLogImpl extends RequestLogImpl implements LifeCycle {}
+public class LifeCycleImplementingRequestLogImpl extends RequestLogImpl implements LifeCycle {
+  @Override
+  public boolean isRunning() {
+      return isStarted();
+  }
+
+  @Override
+  public boolean isStarting() {
+      return false;
+  }
+
+  @Override
+  public boolean isStopping() {
+      return false;
+  }
+
+  @Override
+  public boolean isStopped() {
+      return !isStarted();
+  }
+
+  @Override
+  public boolean isFailed() {
+      return false;
+  }
+
+  @Override
+  public void addLifeCycleListener(Listener listener) {
+      // we'll implement this when asked
+  }
+
+  @Override
+  public void removeLifeCycleListener(Listener listener) {
+      // we'll implement this when asked
+  }
+}