@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4917")
public static class NettyChannelBuilder.LocalSocketPicker
extends java.lang.Object
createSocketAddress(java.net.SocketAddress, io.grpc.Attributes)
. The default implementation is a no-op.Constructor | Description |
---|---|
LocalSocketPicker() |
Modifier and Type | Method | Description |
---|---|---|
java.net.SocketAddress |
createSocketAddress(java.net.SocketAddress remoteAddress,
io.grpc.Attributes attrs) |
Called by gRPC to pick local socket to bind to.
|
@Nullable public java.net.SocketAddress createSocketAddress(java.net.SocketAddress remoteAddress, @Attr io.grpc.Attributes attrs)
remoteAddress
- the remote address to connect to.attrs
- the Attributes present on the EquivalentAddressGroup
associated
with the address.SocketAddress
suitable for binding, or else null
.