io.github.stewseo.client.transport.endpoints.DelegatingJsonEndpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yelp-fusion-client Show documentation
Show all versions of yelp-fusion-client Show documentation
java client to build api objects, handle http transport, and parse/deserialize/serialize json to/from json
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