adapt master to develop
[taxeditor.git] / eu.etaxonomy.taxeditor.cdmlib / src / main / java / eu / etaxonomy / taxeditor / remoting / RemoteExecutionTimestampsUtil.java
1 /**
2 * Copyright (C) 2020 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.remoting;
10
11 /**
12 * Singleton/static class to log the last httpInvoker
13 * request and response metadata.
14 * This is currently static to be easily accessible by MessagingUtils.
15 *
16 * Note: does not work clean in a multi-thread environment yet.
17 *
18 * @author a.kohlbecker
19 * @since Jan 17, 2020
20 */
21 public class RemoteExecutionTimestampsUtil {
22
23 private static String lastRequestClientTime = null;
24
25 private static String lastResponseHeaderTime = null;
26
27 private static String lastService = null;
28
29 private static String lastMethod = null;
30
31
32 public RemoteExecutionTimestampsUtil() {
33 }
34
35 static public String getLastRequestClientTime() {
36 return lastRequestClientTime;
37 }
38
39 static public void setLastRequestClientTime(String time) {
40 lastRequestClientTime = time;
41 }
42
43 static public String getLastResponseHttpHeaderTime() {
44 return lastResponseHeaderTime;
45 }
46
47 static public void setLastResponseHttpHeaderTime(String time) {
48 lastResponseHeaderTime = time;
49 }
50
51 static public String getLastService() {
52 return lastService;
53 }
54
55 static public void setLastService(String lastService) {
56 RemoteExecutionTimestampsUtil.lastService = lastService;
57 }
58
59 static public String getLastMethod() {
60 return lastMethod;
61 }
62
63 static public void setLastMethod(String lastMethod) {
64 RemoteExecutionTimestampsUtil.lastMethod = lastMethod;
65 }
66 }