Convenient builders for channels and servers.
Right now only netty-based builders are implemented. OkHttp based
builders will be created separately.
Minimal example of creating a stub:
ChannelImpl channel = NettyChannelBuilder
.newBuilder(new InetSocketAddress("localhost", 8980))
.buildAndWaitForRunning();
StockBlockingStub stub = StockGrpc.newStub(channel);
Minimal example of creating and starting a server:
ServerImpl server = NettyServerBuilder.newBuilder(8980)
.addService(StockGrpc.bindService(new StockServer()))
.buildAndWaitForRunning();
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=77787502
5 files changed