GCKRequest 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
用于跟踪异步请求的对象。
如需查看委托协议,请参阅 GCKRequestDelegate。
- 开始时间
- 3.0
此类继承 NSObject。
取消请求。
取消请求并不能保证接收方不会完成该请求,而只会导致发送方停止跟踪该请求。
- (void) failWithError: |
|
(GCKError *) |
error |
|
使请求失败并相应地通知委托。
此方法只能在应用使用 GCKRequest::requestWithID: 工厂方法构建的 GCKRequest 对象上调用。对由框架本身创建的 GCKRequest 对象调用此方法将引发异常。
- Parameters
-
error | The error describing the failure. |
- 开始时间
- 3.4
- (void) abortWithReason: |
|
(GCKRequestAbortReason) |
reason |
|
中止请求并提供原因,并相应地通知委托人。
此方法只能在应用使用 GCKRequest::requestWithID: 工厂方法构建的 GCKRequest 对象上调用。对由框架本身创建的 GCKRequest 对象调用此方法将引发异常。
- Parameters
-
reason | The reason for the abort. |
- 开始时间
- 3.4
- (GCKRequestID) requestID |
|
readnonatomicassign |
一个标志,用于指示相应请求是否为外部请求,即由应用而非框架本身创建的请求。
- 开始时间
- 3.4
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eGCKRequest\u003c/code\u003e class is an object used for tracking asynchronous requests in Google Cast.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides methods to manage the lifecycle of a request such as canceling, completing, failing, or aborting it.\u003c/p\u003e\n"],["\u003cp\u003eApplications can create and manage their own \u003ccode\u003eGCKRequest\u003c/code\u003e objects using the provided factory and management methods.\u003c/p\u003e\n"],["\u003cp\u003eA delegate can be assigned to receive notifications about the status and outcome of requests.\u003c/p\u003e\n"],["\u003cp\u003eEach request has properties like a unique ID, an optional error object, and flags to indicate progress and origin.\u003c/p\u003e\n"]]],[],null,[]]