MCPcopy Create free account
hub / github.com/grpc/grpc-java / provider

Method provider

api/src/main/java/io/grpc/ServerProvider.java:41–48  ·  view source on GitHub ↗

Returns the ClassLoader-wide default server. @throws ProviderNotFoundException if no provider is available

()

Source from the content-addressed store, hash-verified

39 * @throws ProviderNotFoundException if no provider is available
40 */
41 public static ServerProvider provider() {
42 ServerProvider provider = ServerRegistry.getDefaultRegistry().provider();
43 if (provider == null) {
44 throw new ProviderNotFoundException("No functional server found. "
45 + "Try adding a dependency on the grpc-netty or grpc-netty-shaded artifact");
46 }
47 return provider;
48 }
49
50 /**
51 * Whether this provider is available for use, taking the current environment into consideration.

Callers 5

forPortMethod · 0.95
providedMethod · 0.95
providedMethod · 0.95

Calls 1

getDefaultRegistryMethod · 0.95

Tested by 4

providedMethod · 0.76
providedMethod · 0.76