Skip to content

Commit 60dafd0

Browse files
committed
add setter for allowed hard bound token types to only the GRPC channel provider.
1 parent ddb3b79 commit 60dafd0

File tree

6 files changed

+0
-38
lines changed

6 files changed

+0
-38
lines changed

gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ public TransportChannelProvider withEndpoint(String endpoint) {
228228
return toBuilder().setEndpoint(endpoint).build();
229229
}
230230

231-
@Override
232231
public TransportChannelProvider setAllowHardBoundTokens(ArrayList<String> allowedValues) {
233232
return toBuilder().setAllowHardBoundTokenTypes(allowedValues).build();
234233
}

gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/testing/LocalChannelProvider.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import io.grpc.MethodDescriptor;
4848
import io.grpc.inprocess.InProcessChannelBuilder;
4949
import java.io.IOException;
50-
import java.util.ArrayList;
5150
import java.util.List;
5251
import java.util.Map;
5352
import java.util.concurrent.CopyOnWriteArrayList;
@@ -107,12 +106,6 @@ public TransportChannelProvider withEndpoint(String endpoint) {
107106
throw new UnsupportedOperationException("LocalChannelProvider doesn't need an endpoint");
108107
}
109108

110-
@Override
111-
public TransportChannelProvider setAllowHardBoundTokens(ArrayList<String> allowedValues) {
112-
throw new UnsupportedOperationException(
113-
"LocalChannelProvider doesn't support hard-bound tokens");
114-
}
115-
116109
@Override
117110
@BetaApi("The surface for customizing pool size is not stable yet and may change in the future.")
118111
public boolean acceptsPoolSize() {

gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/InstantiatingHttpJsonChannelProvider.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import java.io.IOException;
4343
import java.security.GeneralSecurityException;
4444
import java.security.KeyStore;
45-
import java.util.ArrayList;
4645
import java.util.Map;
4746
import java.util.concurrent.Executor;
4847
import java.util.concurrent.ScheduledExecutorService;
@@ -140,12 +139,6 @@ public TransportChannelProvider withPoolSize(int size) {
140139
"InstantiatingHttpJsonChannelProvider doesn't allow pool size customization");
141140
}
142141

143-
@Override
144-
public TransportChannelProvider setAllowHardBoundTokens(ArrayList<String> allowedValues) {
145-
throw new UnsupportedOperationException(
146-
"InstantiatingHttpJsonChannelProvider doesn't support hard-bound tokens");
147-
}
148-
149142
@Override
150143
public String getTransportName() {
151144
return HttpJsonTransportChannel.getHttpJsonTransportName();

gax-java/gax/src/main/java/com/google/api/gax/rpc/FixedTransportChannelProvider.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import com.google.auth.Credentials;
3434
import com.google.common.base.Preconditions;
3535
import java.io.IOException;
36-
import java.util.ArrayList;
3736
import java.util.Map;
3837
import java.util.concurrent.Executor;
3938
import java.util.concurrent.ScheduledExecutorService;
@@ -69,12 +68,6 @@ public FixedTransportChannelProvider withExecutor(Executor executor) {
6968
"FixedTransportChannelProvider doesn't need an executor");
7069
}
7170

72-
@Override
73-
public TransportChannelProvider setAllowHardBoundTokens(ArrayList<String> allowedValues) {
74-
throw new UnsupportedOperationException(
75-
"FixedTransportChannelProvider doesn't support hard-bound tokens");
76-
}
77-
7871
@Override
7972
public boolean needsHeaders() {
8073
return false;

gax-java/gax/src/main/java/com/google/api/gax/rpc/TransportChannelProvider.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import com.google.api.core.InternalExtensionOnly;
3434
import com.google.auth.Credentials;
3535
import java.io.IOException;
36-
import java.util.ArrayList;
3736
import java.util.Map;
3837
import java.util.concurrent.Executor;
3938
import java.util.concurrent.ScheduledExecutorService;
@@ -98,9 +97,6 @@ public interface TransportChannelProvider {
9897
*/
9998
TransportChannelProvider withEndpoint(String endpoint);
10099

101-
/** Sets the allowed hard bound token types. */
102-
TransportChannelProvider setAllowHardBoundTokens(ArrayList<String> allowedValues);
103-
104100
/**
105101
* Reports whether this provider allows pool size customization.
106102
*

gax-java/gax/src/test/java/com/google/api/gax/rpc/ClientContextTest.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
import com.google.common.truth.Truth;
6464
import java.io.IOException;
6565
import java.net.URI;
66-
import java.util.ArrayList;
6766
import java.util.Collections;
6867
import java.util.List;
6968
import java.util.Map;
@@ -201,17 +200,6 @@ public boolean acceptsPoolSize() {
201200
return false;
202201
}
203202

204-
@Override
205-
public TransportChannelProvider setAllowHardBoundTokens(ArrayList<String> allowedValues) {
206-
return new FakeTransportProvider(
207-
this.transport,
208-
this.executor,
209-
this.shouldAutoClose,
210-
this.headers,
211-
this.credentials,
212-
this.endpoint);
213-
}
214-
215203
@Override
216204
public TransportChannelProvider withPoolSize(int size) {
217205
throw new UnsupportedOperationException(

0 commit comments

Comments
 (0)