.setExecutor(executor) .setTransportChannel(transportChannel) .setDefaultCallContext(GrpcCallContext.of(managedChannel, CallOptions.DEFAULT)) .setBackgroundResources( Collections.<BackgroundResource>singletonList(transportChannel))
.setExecutor(executor) .setTransportChannel(transportChannel) .setDefaultCallContext(GrpcCallContext.of(managedChannel, CallOptions.DEFAULT)) .setBackgroundResources( Collections.<BackgroundResource>singletonList(transportChannel))
ClientContext.newBuilder() .setTransportChannel(GrpcTransportChannel.create(channel)) .setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)) .build();
@Before public void setUp() throws InstantiationException, IllegalAccessException, IOException { String serverName = "fakeservice"; serviceImpl = new FakeServiceImpl(); inprocessServer = new InProcessServer<>(serviceImpl, serverName); inprocessServer.start(); channel = InProcessChannelBuilder.forName(serverName).directExecutor().usePlaintext().build(); clientContext = ClientContext.newBuilder() .setTransportChannel(GrpcTransportChannel.create(channel)) .setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)) .build(); }
@Before public void setUp() throws Exception { String serverName = "fakeservice"; FakeServiceImpl serviceImpl = new FakeServiceImpl(); inprocessServer = new InProcessServer<>(serviceImpl, serverName); inprocessServer.start(); channel = InProcessChannelBuilder.forName(serverName).directExecutor().usePlaintext().build(); clientContext = ClientContext.newBuilder() .setTransportChannel(GrpcTransportChannel.create(channel)) .setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)) .build(); }
.setExecutor(executor) .setTransportChannel(transportChannel) .setDefaultCallContext(GrpcCallContext.of(managedChannel, CallOptions.DEFAULT)) .setBackgroundResources( Collections.<BackgroundResource>singletonList(transportChannel))
.setExecutor(executor) .setTransportChannel(transportChannel) .setDefaultCallContext(GrpcCallContext.of(managedChannel, CallOptions.DEFAULT)) .setBackgroundResources( Collections.<BackgroundResource>singletonList(transportChannel))
@Before public void setUp() throws InstantiationException, IllegalAccessException, IOException { String serverName = "fakeservice"; FakeServiceImpl serviceImpl = new FakeServiceImpl(); inprocessServer = new InProcessServer<>(serviceImpl, serverName); inprocessServer.start(); channel = InProcessChannelBuilder.forName(serverName).directExecutor().usePlaintext().build(); clientContext = ClientContext.newBuilder() .setTransportChannel(GrpcTransportChannel.create(channel)) .setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)) .build(); streamingCallSettings = ServerStreamingCallSettings.<Color, Money>newBuilder().build(); streamingCallable = GrpcCallableFactory.createServerStreamingCallable( GrpcCallSettings.create(METHOD_SERVER_STREAMING_RECOGNIZE), streamingCallSettings, clientContext); }
GrpcTransportChannel.newBuilder().setManagedChannel(channel).build()) .setExecutor(executor) .setDefaultCallContext(GrpcCallContext.of(channel, CallOptions.DEFAULT)) .setClock(clock) .build();