Skip to content

Commit

Permalink
default withUseS2A doesn't throw an exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Jan 21, 2025
1 parent a814a53 commit 1703f51
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ public TransportChannelProvider withEndpoint(String endpoint) {
throw new UnsupportedOperationException("LocalChannelProvider doesn't need an endpoint");
}

@Override
public TransportChannelProvider withUseS2A(boolean useS2A) {
// Overriden for technical reasons. This method is a no-op for LocalChannelProvider.
return this;
}

@Override
@BetaApi("The surface for customizing pool size is not stable yet and may change in the future.")
public boolean acceptsPoolSize() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ public TransportChannelProvider withEndpoint(String endpoint) {
return toBuilder().setEndpoint(endpoint).build();
}

@Override
public TransportChannelProvider withUseS2A(boolean useS2A) {
return this;
}

/** @deprecated REST transport channel doesn't support channel pooling */
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ public TransportChannelProvider withEndpoint(String endpoint) {
"FixedTransportChannelProvider doesn't need an endpoint");
}

@Override
public TransportChannelProvider withUseS2A(boolean useS2A) throws UnsupportedOperationException {
// Overriden for technical reasons. This method is a no-op for FixedTransportChannelProvider.
return this;
}

/** @deprecated FixedTransportChannelProvider doesn't support ChannelPool configuration */
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public interface TransportChannelProvider {
@BetaApi(
"The S2A feature is not stable yet and may change in the future. https://github.com/grpc/grpc-java/issues/11533.")
default TransportChannelProvider withUseS2A(boolean useS2A) {
throw new UnsupportedOperationException("S2A is not supported");
return this;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,6 @@ public TransportChannelProvider withEndpoint(String endpoint) {
endpoint);
}

@Override
public TransportChannelProvider withUseS2A(boolean useS2A) {
return new FakeTransportProvider(
this.transport,
this.executor,
this.shouldAutoClose,
this.headers,
this.credentials,
this.endpoint);
}

@Override
public boolean acceptsPoolSize() {
return false;
Expand Down

0 comments on commit 1703f51

Please sign in to comment.