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 'Unary':
      return this.unary(ctx, request as $2.EncryptedMessage);
    case 'ServerStreaming':
      return this.serverStreaming(ctx, request as $2.EncryptedMessage);
    default:
      throw $core.ArgumentError('Unknown method: $method');
  }
}