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

Method addServices

api/src/main/java/io/grpc/ServerBuilder.java:126–132  ·  view source on GitHub ↗

Adds a list of service implementations to the handler registry together. This exists for convenience - equivalent to repeatedly calling addService() with different services. If multiple services on the list use the same name, only the last one on the list will be added. @param services the list of

(List<ServerServiceDefinition> services)

Source from the content-addressed store, hash-verified

124 * @since 1.37.0
125 */
126 public final T addServices(List<ServerServiceDefinition> services) {
127 checkNotNull(services, "services");
128 for (ServerServiceDefinition service : services) {
129 addService(service);
130 }
131 return thisT();
132 }
133
134 /**
135 * Adds a {@link ServerInterceptor} that is run for all services on the server. Interceptors

Callers 5

startMethod · 0.80
runMethod · 0.80
runServerMethod · 0.80
mainMethod · 0.80
mainMethod · 0.80

Calls 3

addServiceMethod · 0.95
thisTMethod · 0.95
checkNotNullMethod · 0.80

Tested by 3

startMethod · 0.64
runMethod · 0.64
runServerMethod · 0.64