changeset 584:5f07f000f00f

HttpRequestResponseMetric - minor
author Devel 1
date Mon, 02 Oct 2017 16:13:43 +0200
parents a2c21f45a503
children ecdae4e189ee
files stress-tester/src/main/java/com/passus/st/client/http/HttpRequestResponseMetric.java stress-tester/src/main/java/com/passus/st/client/http/ReporterRemoteDestination.java
diffstat 2 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/client/http/HttpRequestResponseMetric.java	Mon Oct 02 09:52:48 2017 +0200
+++ b/stress-tester/src/main/java/com/passus/st/client/http/HttpRequestResponseMetric.java	Mon Oct 02 16:13:43 2017 +0200
@@ -1,7 +1,7 @@
 package com.passus.st.client.http;
 
-import com.passus.commons.Assert;
 import com.passus.commons.metric.Metric;
+import com.passus.data.ByteString;
 import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
@@ -65,9 +65,9 @@
     private Integer origServerPort;
     
     private String reqId;
-    private HashMap<CharSequence, CharSequence> reqHdrs = new HashMap<>();
-    private HashMap<CharSequence, CharSequence> respHdrs = new HashMap<>();
-    private HashMap<CharSequence, CharSequence> misc = new HashMap<>();
+    private HashMap<ByteString, ByteString> reqHdrs = new HashMap<>();
+    private HashMap<ByteString, ByteString> respHdrs = new HashMap<>();
+    private HashMap<String, String> misc = new HashMap<>();
     
     private Long reqHdrSize;
     private Long reqCntSize;
@@ -160,27 +160,27 @@
         this.reqId = reqId;
     }
     
-    public HashMap<CharSequence, CharSequence> getReqHdrs() {
+    public HashMap<ByteString, ByteString> getReqHdrs() {
         return reqHdrs;
     }
     
-    public void setReqHdrs(HashMap<CharSequence, CharSequence> reqHdrs) {
+    public void setReqHdrs(HashMap<ByteString, ByteString> reqHdrs) {
         this.reqHdrs = reqHdrs;
     }
     
-    public HashMap<CharSequence, CharSequence> getRespHdrs() {
+    public HashMap<ByteString, ByteString> getRespHdrs() {
         return respHdrs;
     }
     
-    public void setRespHdrs(HashMap<CharSequence, CharSequence> respHdrs) {
+    public void setRespHdrs(HashMap<ByteString, ByteString> respHdrs) {
         this.respHdrs = respHdrs;
     }
     
-    public HashMap<CharSequence, CharSequence> getMisc() {
+    public HashMap<String, String> getMisc() {
         return misc;
     }
     
-    public void setMisc(HashMap<CharSequence, CharSequence> misc) {
+    public void setMisc(HashMap<String, String> misc) {
         this.misc = misc;
     }
     
--- a/stress-tester/src/main/java/com/passus/st/client/http/ReporterRemoteDestination.java	Mon Oct 02 09:52:48 2017 +0200
+++ b/stress-tester/src/main/java/com/passus/st/client/http/ReporterRemoteDestination.java	Mon Oct 02 16:13:43 2017 +0200
@@ -32,7 +32,7 @@
         this.reporterClient = reporterClient;
     }
 
-    private void populateHeaders(Map<CharSequence, CharSequence> dst, Set<ByteString> allowedHeaders, HttpMessage message) {
+    public static void populateHeaders(Map<ByteString, ByteString> dst, Set<ByteString> allowedHeaders, HttpMessage message) {
         HttpHeaders headers = message.getHeaders();
         for (ByteString name : allowedHeaders) {
             ByteString value = headers.get(name);
@@ -42,7 +42,7 @@
         }
     }
 
-    private void populateMisc(Map<CharSequence, CharSequence> misc, HttpFlowContext context, HttpRequest request) {
+    public static void populateMisc(Map<String, String> misc, HttpFlowContext context, HttpRequest request) {
         ParametersBag params = context.scopes().getSession(request, false);
         String username = params == null ? null : (String) params.get(PARAM_USERNAME);