Returns the value of a custom arg named 'key', or null if it's not set. While ordinary Args should be universally useful and meaningful, custom arguments can apply just to resolvers of a certain URI scheme, just to resolvers producing a particular type of {@link java.net.SocketAd
(Key<T> key)
| 453 | * io.grpc package. |
| 454 | */ |
| 455 | @SuppressWarnings("unchecked") // Cast is safe because all put()s go through the setArg() API. |
| 456 | @Nullable |
| 457 | public <T> T getArg(Key<T> key) { |
| 458 | return customArgs != null ? (T) customArgs.get(key) : null; |
| 459 | } |
| 460 | |
| 461 | /** |
| 462 | * Returns the {@link ChannelLogger} for the Channel served by this NameResolver. |