All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyuncs.v5.utils.HttpHeadersInjectAdapter Maven / Gradle / Ivy

package com.aliyuncs.v5.utils;

import com.aliyuncs.v5.AcsRequest;
import io.opentracing.propagation.TextMap;

import java.util.Iterator;
import java.util.Map;

public class HttpHeadersInjectAdapter implements TextMap {

    private AcsRequest request ;

    public HttpHeadersInjectAdapter(AcsRequest request) {
        this.request = request;
    }

    @Override
    public void put(String key, String value) {
        request.putHeaderParameter(key, value);
    }

    @Override
    public Iterator> iterator() {
        throw new UnsupportedOperationException("This class should be used only with tracer#inject()");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy