@Test public void addReturnsPrevious() { assertNull(registry.addService(basicServiceDefinition)); assertSame(basicServiceDefinition, registry.addService(ServerServiceDefinition.builder( new ServiceDescriptor("basic")).build())); }
@Nullable public ServerServiceDefinition addService(ServerServiceDefinition service) { return services.put(service.getServiceDescriptor().getName(), service); }
MutableHandlerRegistry extends HandlerRegistry { @Nullable public ServerServiceDefinition addService(ServerServiceDefinition service) { return services.put(service.getServiceDescriptor().getName(), service); } }
MutableHandlerRegistry extends HandlerRegistry { @Nullable public ServerServiceDefinition addService(ServerServiceDefinition service) { return services.put(service.getServiceDescriptor().getName(), service); }  }
MutableHandlerRegistry extends HandlerRegistry { @Nullable public ServerServiceDefinition addService(ServerServiceDefinition service) { return services.put(service.getServiceDescriptor().getName(), service); }  @Nullable ServerServiceDefinition addService(ServerServiceDefinition service); @Nullable ServerServiceDefinition addService(BindableService bindableService); boolean removeService(ServerServiceDefinition service); @Override @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222") List<ServerServiceDefinition> getServices(); @Override @Nullable ServerMethodDefinition<?, ?> lookupMethod(String methodName, @Nullable String authority); }
MutableHandlerRegistry extends HandlerRegistry { @Nullable public ServerServiceDefinition addService(ServerServiceDefinition service) { return services.put(service.getServiceDescriptor().getName(), service); }  @Nullable ServerServiceDefinition addService(ServerServiceDefinition service); @Nullable ServerServiceDefinition addService(BindableService bindableService); boolean removeService(ServerServiceDefinition service); @Override @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222") List<ServerServiceDefinition> getServices(); @Override @Nullable ServerMethodDefinition<?, ?> lookupMethod(String methodName, @Nullable String authority);  }