Skip to content

Commit

Permalink
Merge pull request Azure#227 from RikkiGibson/RemoveResponseBuilder
Browse files Browse the repository at this point in the history
Remove response builder
  • Loading branch information
RikkiGibson authored Sep 21, 2017
2 parents 3f3c753 + 7b2e2eb commit 435be7f
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 464 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ protected AzureServiceClient(String baseUrl, ServiceClientCredentials credential
.withBaseUrl(baseUrl)
.withCredentials(credentials)
.withSerializerAdapter(new AzureJacksonAdapter())
.withResponseBuilderFactory(new AzureResponseBuilder.Factory())
.build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,9 @@
package com.microsoft.azure.v2;

import com.microsoft.azure.v2.annotations.AzureHost;
import com.microsoft.rest.RestClient;
import com.microsoft.rest.ServiceResponseBuilder;
import com.microsoft.rest.serializer.JacksonAdapter;
import com.microsoft.rest.v2.RestProxy;
import com.microsoft.rest.v2.annotations.GET;
import com.microsoft.rest.v2.annotations.HostParam;
import com.microsoft.rest.v2.annotations.PathParam;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

public class AzureTests {

Expand Down
27 changes: 0 additions & 27 deletions client-runtime/src/main/java/com/microsoft/rest/RestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.protocol.Environment;
import com.microsoft.rest.protocol.ResponseBuilder;
import com.microsoft.rest.protocol.SerializerAdapter;
import com.microsoft.rest.v2.http.ChannelHandlerConfig;
import com.microsoft.rest.v2.http.HttpClient;
Expand All @@ -35,7 +34,6 @@ public final class RestClient {
private final long readTimeoutMillis;
private final long connectionTimeoutMillis;
private final SerializerAdapter<?> serializerAdapter;
private final ResponseBuilder.Factory responseBuilderFactory;
private final ServiceClientCredentials credentials;
private final LogLevel logLevel;

Expand All @@ -47,7 +45,6 @@ private RestClient(RestClient.Builder builder) {
this.readTimeoutMillis = builder.readTimeoutMillis;
this.connectionTimeoutMillis = builder.connectionTimeoutMillis;
this.serializerAdapter = builder.serializerAdapter;
this.responseBuilderFactory = builder.responseBuilderFactory;
this.credentials = builder.credentials;
this.logLevel = builder.logLevel;
this.customPolicyFactories = builder.customPolicyFactories;
Expand Down Expand Up @@ -81,13 +78,6 @@ public SerializerAdapter<?> serializerAdapter() {
return serializerAdapter;
}

/**
* @return the current respnose builder factory.
*/
public ResponseBuilder.Factory responseBuilderFactory() {
return responseBuilderFactory;
}

/**
* @return the {@link HttpClient} instance
*/
Expand Down Expand Up @@ -158,15 +148,12 @@ public static class Builder {
private long connectionTimeoutMillis = defaultConnectionTimeoutMillis;
/** The adapter for serializations and deserializations. */
private SerializerAdapter<?> serializerAdapter;
/** The builder factory for response builders. */
private ResponseBuilder.Factory responseBuilderFactory;
/** The logging level to use. */
private LogLevel logLevel = LogLevel.NONE;

private Builder(final RestClient restClient) {
this.baseUrl = restClient.baseURL;
this.userAgent = restClient.userAgent;
this.responseBuilderFactory = restClient.responseBuilderFactory;
this.connectionTimeoutMillis = restClient.connectionTimeoutMillis;
this.readTimeoutMillis = restClient.readTimeoutMillis;
this.serializerAdapter = restClient.serializerAdapter;
Expand Down Expand Up @@ -214,17 +201,6 @@ public Builder withSerializerAdapter(SerializerAdapter<?> serializerAdapter) {
return this;
}

/**
* Sets the response builder factory.
*
* @param responseBuilderFactory the response builder factory
* @return the builder itself for chaining
*/
public Builder withResponseBuilderFactory(ResponseBuilder.Factory responseBuilderFactory) {
this.responseBuilderFactory = responseBuilderFactory;
return this;
}

/**
* Sets the credentials.
*
Expand Down Expand Up @@ -320,9 +296,6 @@ public RestClient build() {
if (baseUrl == null) {
throw new IllegalArgumentException("Please set base URL.");
}
if (responseBuilderFactory == null) {
throw new IllegalArgumentException("Please set response builder factory.");
}
if (serializerAdapter == null) {
throw new IllegalArgumentException("Please set serializer adapter.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ protected ServiceClient(String baseUrl) {
this(new RestClient.Builder()
.withBaseUrl(baseUrl)
.withLogLevel(LogLevel.BODY_AND_HEADERS)
.withResponseBuilderFactory(new ServiceResponseBuilder.Factory())
.withSerializerAdapter(new JacksonAdapter())
.build());
}
Expand Down
Loading

0 comments on commit 435be7f

Please sign in to comment.