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 |
リクエストが失敗する原因となったエラー(存在する場合)。それ以外の場合は nil
。
これが外部リクエスト(フレームワーク自体ではなくアプリケーションによって作成されたリクエスト)かどうかを示すフラグ。
- 開始:
- 3.4
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-12-02 UTC。
[null,null,["最終更新日 2023-12-02 UTC。"],[[["The `GCKRequest` class is used for tracking asynchronous requests made to a Google Cast device."],["Applications can create and manage their own `GCKRequest` objects, or they can use the framework-provided ones."],["`GCKRequest` objects have a delegate that is notified of the request's progress and completion status."],["A `GCKRequest` can be canceled, completed, failed, or aborted, depending on the outcome of the operation it is tracking."],["Each `GCKRequest` has a unique ID and properties indicating its progress, any associated errors, and whether it's an external request."]]],["The GCKRequest class manages asynchronous requests, enabling tracking and control. Key actions include: canceling a request (`cancel`), completing it (`complete`), or failing it with an error (`failWithError:`) or a reason (`abortWithReason:`). Applications can create request objects using `applicationRequest`. Properties like `delegate`, `requestID`, `error`, `inProgress`, and `external` provide request status information. The delegate receives notifications about the request status. These request objects created by applications can be managed by the application using the methods complete, failWithError and abortWithReason.\n"]]