39 lines
1.3 KiB
Java
39 lines
1.3 KiB
Java
|
package io.grpc.inprocess;
|
||
|
|
||
|
import com.google.common.base.Preconditions;
|
||
|
import java.io.IOException;
|
||
|
import java.net.SocketAddress;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public final class AnonymousInProcessSocketAddress extends SocketAddress {
|
||
|
private static final long serialVersionUID = -8567592561863414695L;
|
||
|
private InProcessServer server;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final InProcessServer getServer() {
|
||
|
InProcessServer inProcessServer;
|
||
|
synchronized (this) {
|
||
|
inProcessServer = this.server;
|
||
|
}
|
||
|
return inProcessServer;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void setServer(InProcessServer inProcessServer) throws IOException {
|
||
|
synchronized (this) {
|
||
|
if (this.server != null) {
|
||
|
throw new IOException("Server instance already registered");
|
||
|
}
|
||
|
this.server = inProcessServer;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void clearServer(InProcessServer inProcessServer) {
|
||
|
synchronized (this) {
|
||
|
Preconditions.checkState(this.server == inProcessServer);
|
||
|
this.server = null;
|
||
|
}
|
||
|
}
|
||
|
}
|