tv.ouya.console.api
Interface OuyaResponseListener<T>

Type Parameters:
T - The type returned if the request succeeds.
All Known Implementing Classes:
CancelIgnoringOuyaResponseListener

public interface OuyaResponseListener<T>

Represents a listener for asynchronous replies from the Ouya server to requests made through the OuyaFacade. This class is generified on the return type of the request. Implementors of this interface are passed to methods on OuyaFacade.


Method Summary
 void onCancel()
          Called when the request is canceled by the user via confirmation, authentication or related dialog.
 void onFailure(int errorCode, java.lang.String errorMessage, android.os.Bundle optionalData)
          Called when the request fails.
 void onSuccess(T result)
          Called when the request succeeds.
 

Method Detail

onSuccess

void onSuccess(T result)
Called when the request succeeds.

Parameters:
result - The success object.

onFailure

void onFailure(int errorCode,
               java.lang.String errorMessage,
               android.os.Bundle optionalData)
Called when the request fails.

Parameters:
errorCode - An HTTP error code between 0 and 999, if there was one. Otherwise, an internal error code from the Ouya server, documented in the OuyaErrorCodes class.
errorMessage - Empty for HTTP error codes. Otherwise, a brief, non-localized, explanation of the error.
optionalData - A Map of optional key/value pairs which provide additional information.

onCancel

void onCancel()
Called when the request is canceled by the user via confirmation, authentication or related dialog.



Copyright © 2012 OUYA, Inc. All Rights Reserved.