diff options
Diffstat (limited to 'vespaclient-core/src/main/java/com/yahoo/feedhandler/InputStreamRequest.java')
-rw-r--r-- | vespaclient-core/src/main/java/com/yahoo/feedhandler/InputStreamRequest.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vespaclient-core/src/main/java/com/yahoo/feedhandler/InputStreamRequest.java b/vespaclient-core/src/main/java/com/yahoo/feedhandler/InputStreamRequest.java new file mode 100644 index 00000000000..a62ecbd55ec --- /dev/null +++ b/vespaclient-core/src/main/java/com/yahoo/feedhandler/InputStreamRequest.java @@ -0,0 +1,34 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.feedhandler; + +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +/** + * This is needed because whoever wrote this library moronically decided to pass in-process communication through + * the HTTP layer. As the feeded is being phased out in favor of the standalone HTTP client we don't bother to clean + * it up properly. + * + * @author bratseth + */ +public class InputStreamRequest { + + private final InputStream input; + private final Map<String, String> properties = new HashMap<>(); + + public InputStreamRequest(InputStream input) { + this.input = input; + } + + public void setProperty(String key, String value) { + properties.put(key, value); + } + + public String getProperty(String key) { + return properties.get(key); + } + + InputStream getData() { return input; } + +} |