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<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
InterruptedException
public void getFeature(int lat, int lon)
public void listFeatures(int lowLat, int lowLon, int hiLat, int hiLon)
public void recordRoute(List<Feature> features, int numPoints) throws Exception
numPoints
randomly chosen points from features
with a variable delay in between. Prints the statistics when they are sent from the
server.Exception
public void routeChat() throws Exception
Exception