Skip to content

Commit 80e2aa1

Browse files
committed
Rename classes s/UDS/Uds/
1 parent 067abdf commit 80e2aa1

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

android-interop-testing/src/androidTest/java/io/grpc/android/integrationtest/UdsChannelInteropTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import androidx.test.runner.AndroidJUnit4;
2626
import com.google.common.util.concurrent.SettableFuture;
2727
import io.grpc.Server;
28-
import io.grpc.android.UDSChannelBuilder;
28+
import io.grpc.android.UdsChannelBuilder;
2929
import io.grpc.android.integrationtest.InteropTask.Listener;
3030
import io.grpc.netty.NettyServerBuilder;
3131
import io.grpc.testing.integration.TestServiceImpl;
@@ -39,7 +39,7 @@
3939
import org.junit.runner.RunWith;
4040

4141
/**
42-
* Tests for channels created with {@link UDSChannelBuilder}. The UDS Channel is only meant to talk
42+
* Tests for channels created with {@link UdsChannelBuilder}. The UDS Channel is only meant to talk
4343
* to Unix Domain Socket endpoints on servers that are on-device, so a {@link LocalTestServer} is
4444
* set up to expose a UDS endpoint.
4545
*/
@@ -123,7 +123,7 @@ public void onComplete(String result) {
123123

124124
new InteropTask(
125125
listener,
126-
UDSChannelBuilder.forPath(UDS_PATH, Namespace.ABSTRACT)
126+
UdsChannelBuilder.forPath(UDS_PATH, Namespace.ABSTRACT)
127127
.maxInboundMessageSize(16 * 1024 * 1024)
128128
.build(),
129129
testCase)

android-interop-testing/src/main/java/io/grpc/android/integrationtest/TesterActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import androidx.appcompat.app.AppCompatActivity;
3232
import com.google.android.gms.security.ProviderInstaller;
3333
import io.grpc.ManagedChannel;
34-
import io.grpc.android.UDSChannelBuilder;
34+
import io.grpc.android.UdsChannelBuilder;
3535
import java.io.IOException;
3636
import java.io.InputStream;
3737
import java.util.ArrayList;
@@ -146,7 +146,7 @@ private void startTest(String testCase) {
146146
// Create Channel
147147
ManagedChannel channel;
148148
if (udsEnabled) {
149-
channel = UDSChannelBuilder.forPath(udsPath, Namespace.ABSTRACT).build();
149+
channel = UdsChannelBuilder.forPath(udsPath, Namespace.ABSTRACT).build();
150150
} else {
151151
channel = TesterOkHttpChannelBuilder.build(host, port, serverHostOverride, true, testCert);
152152
}

android/src/main/java/io/grpc/android/UDSChannelBuilder.java renamed to android/src/main/java/io/grpc/android/UdsChannelBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727

2828
/**
2929
* Creates a UDS channel by passing in a specialized SocketFactory into an OkHttpChannelBuilder. The
30-
* UDSSockets produced by this factory communicate over Android's LocalSockets.
30+
* UdsSockets produced by this factory communicate over Android's LocalSockets.
3131
*
3232
* <p>Example Usage <code>
33-
* Channel channel = UDSChannelBuilder.forPath("/data/data/my.app/app.socket",
33+
* Channel channel = UdsChannelBuilder.forPath("/data/data/my.app/app.socket",
3434
* Namespace.FILESYSTEM).build();
3535
* stub = MyService.newStub(channel);
3636
* </code>
@@ -41,7 +41,7 @@
4141
* a `unix:` name resolver when possible.
4242
*/
4343
@ExperimentalApi("A stopgap. Not intended to be stabilized")
44-
public final class UDSChannelBuilder {
44+
public final class UdsChannelBuilder {
4545
@Nullable
4646
@SuppressWarnings("rawtypes")
4747
private static final Class<? extends ManagedChannelBuilder> OKHTTP_CHANNEL_BUILDER_CLASS =
@@ -77,7 +77,7 @@ public static ManagedChannelBuilder<?> forPath(String path, Namespace namespace)
7777
ManagedChannelBuilder<?> builder = OKHTTP_CHANNEL_BUILDER_CLASS.cast(o);
7878
OKHTTP_CHANNEL_BUILDER_CLASS
7979
.getMethod("socketFactory", SocketFactory.class)
80-
.invoke(builder, new UDSSocketFactory(path, namespace));
80+
.invoke(builder, new UdsSocketFactory(path, namespace));
8181
return builder;
8282
} catch (IllegalAccessException e) {
8383
throw new RuntimeException("Failed to create OkHttpChannelBuilder", e);
@@ -88,5 +88,5 @@ public static ManagedChannelBuilder<?> forPath(String path, Namespace namespace)
8888
}
8989
}
9090

91-
private UDSChannelBuilder() {}
91+
private UdsChannelBuilder() {}
9292
}

android/src/main/java/io/grpc/android/UDSSocket.java renamed to android/src/main/java/io/grpc/android/UdsSocket.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import java.nio.channels.SocketChannel;
3232

3333
@SuppressWarnings("UnsynchronizedOverridesSynchronized") // Rely on LocalSocket's synchronization
34-
class UDSSocket extends Socket {
34+
class UdsSocket extends Socket {
3535

3636
private final LocalSocket localSocket;
3737
private final LocalSocketAddress localSocketAddress;
@@ -45,7 +45,7 @@ class UDSSocket extends Socket {
4545
@GuardedBy("this")
4646
private boolean outputShutdown = false;
4747

48-
public UDSSocket(LocalSocketAddress localSocketAddress) {
48+
public UdsSocket(LocalSocketAddress localSocketAddress) {
4949
this.localSocketAddress = localSocketAddress;
5050
localSocket = new LocalSocket();
5151
}
@@ -95,7 +95,7 @@ public InputStream getInputStream() throws IOException {
9595
return new FilterInputStream(localSocket.getInputStream()) {
9696
@Override
9797
public void close() throws IOException {
98-
UDSSocket.this.close();
98+
UdsSocket.this.close();
9999
}
100100
};
101101
}
@@ -130,7 +130,7 @@ public OutputStream getOutputStream() throws IOException {
130130
return new FilterOutputStream(localSocket.getOutputStream()) {
131131
@Override
132132
public void close() throws IOException {
133-
UDSSocket.this.close();
133+
UdsSocket.this.close();
134134
}
135135
};
136136
}

android/src/main/java/io/grpc/android/UDSSocketFactory.java renamed to android/src/main/java/io/grpc/android/UdsSocketFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
import javax.net.SocketFactory;
2727

2828
/**
29-
* A SocketFactory that produces {@link UDSSocket} instances. This is used to provide support for
29+
* A SocketFactory that produces {@link UdsSocket} instances. This is used to provide support for
3030
* gRPC channels with an underlying Unix Domain Socket transport.
3131
*/
32-
class UDSSocketFactory extends SocketFactory {
32+
class UdsSocketFactory extends SocketFactory {
3333

3434
private final LocalSocketAddress localSocketAddress;
3535

36-
public UDSSocketFactory(String path, Namespace namespace) {
36+
public UdsSocketFactory(String path, Namespace namespace) {
3737
localSocketAddress = new LocalSocketAddress(path, namespace);
3838
}
3939

@@ -65,7 +65,7 @@ public Socket createSocket(InetAddress address, int port, InetAddress localAddre
6565
}
6666

6767
private Socket create() {
68-
return new UDSSocket(localSocketAddress);
68+
return new UdsSocket(localSocketAddress);
6969
}
7070

7171
private Socket createAndConnect() throws IOException {

0 commit comments

Comments
 (0)