summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2019-05-14 13:43:43 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2019-05-15 11:16:36 +0200
commite5dca7e1de67a00e606f7f7215fc99f6bf084495 (patch)
tree582db31ca783cf583d2d196c3d9dbc872066a941 /config
parent20f644c175b73230373cec00f8c80ffbf22193e6 (diff)
Add createConfigV3GetConfigMethod overload taking MethodHandler
Diffstat (limited to 'config')
-rw-r--r--config/src/main/java/com/yahoo/vespa/config/JRTMethods.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/JRTMethods.java b/config/src/main/java/com/yahoo/vespa/config/JRTMethods.java
index be9aa8f5f85..1f9bd66972f 100644
--- a/config/src/main/java/com/yahoo/vespa/config/JRTMethods.java
+++ b/config/src/main/java/com/yahoo/vespa/config/JRTMethods.java
@@ -2,6 +2,7 @@
package com.yahoo.vespa.config;
import com.yahoo.jrt.Method;
+import com.yahoo.jrt.MethodHandler;
import com.yahoo.jrt.Request;
/**
@@ -12,10 +13,19 @@ public class JRTMethods {
public static final String configV3getConfigMethodName = "config.v3.getConfig";
private static final String configV3GetConfigRequestTypes = "s";
private static final String configV3GetConfigResponseTypes = "sx";
+
public static Method createConfigV3GetConfigMethod(Object handler, String handlerMethod) {
- return new Method(configV3getConfigMethodName, configV3GetConfigRequestTypes, configV3GetConfigResponseTypes,
- handler, handlerMethod)
- .methodDesc("get config v3")
+ return addDescriptions(
+ new Method(configV3getConfigMethodName, configV3GetConfigRequestTypes, configV3GetConfigResponseTypes, handler, handlerMethod));
+ }
+
+ public static Method createConfigV3GetConfigMethod(MethodHandler methodHandler) {
+ return addDescriptions(
+ new Method(configV3getConfigMethodName, configV3GetConfigRequestTypes, configV3GetConfigResponseTypes, methodHandler));
+ }
+
+ private static Method addDescriptions(Method method) {
+ return method.methodDesc("get config v3")
.paramDesc(0, "request", "config request")
.returnDesc(0, "response", "config response")
.returnDesc(1, "payload", "config response payload");