From the course: Building Java Microservices with gRPC

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Write code to host order service

Write code to host order service

From the course: Building Java Microservices with gRPC

Start my 1-month free trial

Write code to host order service

- So we have completed the OrderServiveImpl class. It is pretty much the same. All the logic is included here. The next step will be to write the OrderServer class in order to host the implementation. So, let's go ahead and this time, what we can do is we just have to take this class UserServer, copy it. It is going to be exactly the same. You just have to modify a couple of things. So I copied the UserServer class and I'm copying it to the same folder, but I'm going to rename it to the OrderServer. Let's make the necessary changes. The logger is the same which is the OrderServer.class.getname. We are good there. Let's make this port number on line 18, five zero zero five two, because this is another server that we will start locally. So it is supposed to be exposed to another port that is five zero zero five two. In addition to that, on line 21, we have to make sure that we feed the correct implementation class. We…

Contents