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

io.github.stewseo.client.transport.endpoints.DelegatingJsonEndpoint Maven / Gradle / Ivy

Go to download

java client to build api objects, handle http transport, and parse/deserialize/serialize json to/from json

There is a newer version: 1.8.0
Show newest version
package io.github.stewseo.client.transport.endpoints;

import io.github.stewseo.client.json.JsonpDeserializer;
import io.github.stewseo.client.transport.JsonEndpoint;

import java.util.Map;

public class DelegatingJsonEndpoint implements JsonEndpoint {

    protected final JsonEndpoint endpoint;

    public DelegatingJsonEndpoint(JsonEndpoint endpoint) {
        this.endpoint = endpoint;
    }

    @Override
    public String id() {
        return endpoint.id();
    }

    @Override
    public String method(Req request) {
        return endpoint.method(request);
    }

    @Override
    public String requestUrl(Req request) {
        return endpoint.requestUrl(request);
    }

    @Override
    public Map queryParameters(Req request) {
        return endpoint.queryParameters(request);
    }

    @Override
    public Map headers(Req request) {
        return endpoint.headers(request);
    }

    @Override
    public boolean hasRequestBody() {
        return endpoint.hasRequestBody();
    }

    @Override
    public JsonpDeserializer responseDeserializer() {
        return endpoint.responseDeserializer();
    }

    @Override
    public boolean isError(int statusCode) {
        return endpoint.isError(statusCode);
    }

    @Override
    public JsonpDeserializer errorDeserializer(int statusCode) {
        return endpoint.errorDeserializer(statusCode);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy