Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public GreeterServer(int port) throws IOException {
  2. this(ServerBuilder.forPort(port), port);
  3. }
  4.  
  5. public GreeterServer(ServerBuilder<?> serverBuilder, int port) {
  6. this.port = port;
  7. server = serverBuilder.addService(new GreeterImpl()).build();
  8. }
  9.  
  10. public void start() throws IOException {
  11. server.start();
  12. logger.info("Server started, listening on " + port);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement