handleCall method

Future<GeneratedMessage> handleCall(
  1. ServerContext ctx,
  2. String method,
  3. GeneratedMessage request
)
override

Dispatches the call. The request object should come from createRequest.

Implementation

$async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx,
    $core.String method, $pb.GeneratedMessage request) {
  switch (method) {
    case 'Ready':
      return this.ready(ctx, request as $0.Empty);
    case 'Allocate':
      return this.allocate(ctx, request as $0.Empty);
    case 'Shutdown':
      return this.shutdown(ctx, request as $0.Empty);
    case 'Health':
      return this.health(ctx, request as $0.Empty);
    case 'GetGameServer':
      return this.getGameServer(ctx, request as $0.Empty);
    case 'WatchGameServer':
      return this.watchGameServer(ctx, request as $0.Empty);
    case 'SetLabel':
      return this.setLabel(ctx, request as $0.KeyValue);
    case 'SetAnnotation':
      return this.setAnnotation(ctx, request as $0.KeyValue);
    case 'Reserve':
      return this.reserve(ctx, request as $0.Duration);
    default:
      throw $core.ArgumentError('Unknown method: $method');
  }
}