public class RouteGuideClient extends Object
| Constructor and Description |
|---|
RouteGuideClient(String host,
int port)
Construct client for accessing RoutGuide server at
host:port. |
| Modifier and Type | Method and Description |
|---|---|
void |
getFeature(int lat,
int lon)
Blocking unary call example.
|
void |
listFeatures(int lowLat,
int lowLon,
int hiLat,
int hiLon)
Blocking server-streaming example.
|
static void |
main(String[] args)
Issues several different requests and then exits.
|
void |
recordRoute(List<io.grpc.examples.routeguide.Feature> features,
int numPoints)
Async client-streaming example.
|
void |
routeChat()
Bi-directional example, which can only be asynchronous.
|
void |
shutdown() |
public RouteGuideClient(String host, int port)
host:port.public void shutdown()
throws InterruptedException
InterruptedExceptionpublic void getFeature(int lat,
int lon)
public void listFeatures(int lowLat,
int lowLon,
int hiLat,
int hiLon)
public void recordRoute(List<io.grpc.examples.routeguide.Feature> features, int numPoints) throws InterruptedException
numPoints randomly chosen points from features with a variable delay in between. Prints the statistics when they are sent from the
server.InterruptedExceptionpublic void routeChat()
throws InterruptedException
InterruptedExceptionpublic static void main(String[] args) throws InterruptedException
InterruptedException