索引
Operations
(接口)
操作
使用 API 服务管理长时间运行的操作。
如果某个 API 方法通常需要很长时间才能完成,您可以将其设计为向客户端返回 Operation
,而客户端可以使用此接口通过轮询操作资源来异步接收实际响应,或者将操作资源传递给另一个 API(如 Google Cloud Pub/Sub API)来接收响应。任何返回长时间运行操作的 API 服务都应实现 Operations
接口,以便为开发者提供一致的客户端体验。
Operations
(接口)使用 API 服务管理长时间运行的操作。
如果某个 API 方法通常需要很长时间才能完成,您可以将其设计为向客户端返回 Operation
,而客户端可以使用此接口通过轮询操作资源来异步接收实际响应,或者将操作资源传递给另一个 API(如 Google Cloud Pub/Sub API)来接收响应。任何返回长时间运行操作的 API 服务都应实现 Operations
接口,以便为开发者提供一致的客户端体验。
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-02-14 UTC.