Android Open Source - AndroidHappyChat Cloud Callback Handler






From Project

Back to project page AndroidHappyChat.

License

The source code is released under:

Apache License

If you think the Android project AndroidHappyChat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * Copyright (c) 2013 Google Inc.//from w  w  w.j  a va  2  s  .c  o  m
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.cloud.backend.android;

import java.io.IOException;
import java.util.List;

/**
 * A handler class to handle an asynchronous callback from Cloud Backend. Used
 * with {@link CloudBackendAsync} and {@link CloudBackendMessaging}.
 *
 */
public abstract class CloudCallbackHandler<T> {

  /**
   * Subclasses should override this to implement a handler method to process
   * the results. If not overridden, the result will be discarded.
   *
   * @param results
   *          The result value (usually, a {@link CloudEntity} or a {@link List}
   *          of CloudEntities)
   */
  public abstract void onComplete(T results);

  /**
   * Subclasses may override this to implement an exception handler. If not
   * overridden, the exception will be ignored.
   *
   * @param exception
   *          {@link IOException} that would be thrown on the request call.
   */
  public void onError(IOException exception) {
  }

}




Java Source Code List

com.google.cloud.backend.android.CloudBackendActivity.java
com.google.cloud.backend.android.CloudBackendAsync.java
com.google.cloud.backend.android.CloudBackendMessaging.java
com.google.cloud.backend.android.CloudBackend.java
com.google.cloud.backend.android.CloudCallbackHandler.java
com.google.cloud.backend.android.CloudEndpointUtils.java
com.google.cloud.backend.android.CloudEntity.java
com.google.cloud.backend.android.CloudQuery.java
com.google.cloud.backend.android.Consts.java
com.google.cloud.backend.android.F.java
com.google.cloud.backend.android.GCMIntentService.java
com.google.cloud.backend.android.mobilebackend.MobilebackendRequestInitializer.java
com.google.cloud.backend.android.mobilebackend.MobilebackendRequest.java
com.google.cloud.backend.android.mobilebackend.Mobilebackend.java
com.google.cloud.backend.android.mobilebackend.model.EntityDto.java
com.google.cloud.backend.android.mobilebackend.model.EntityListDto.java
com.google.cloud.backend.android.mobilebackend.model.FilterDto.java
com.google.cloud.backend.android.mobilebackend.model.Filter.java
com.google.cloud.backend.android.mobilebackend.model.QueryDto.java
com.google.cloud.backend.android.sample.guestbook.GuestbookActivity.java
com.google.cloud.backend.android.sample.socialtalk.SocialTalkActivity.java