当前位置: 首页>>代码示例>>Java>>正文


Java AndroidInvalidationClient类代码示例

本文整理汇总了Java中com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient的典型用法代码示例。如果您正苦于以下问题:Java AndroidInvalidationClient类的具体用法?Java AndroidInvalidationClient怎么用?Java AndroidInvalidationClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AndroidInvalidationClient类属于com.google.ipc.invalidation.external.client.android包,在下文中一共展示了AndroidInvalidationClient类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
@Override
protected void start(Request request, Response.Builder response) {
  String clientKey = request.getClientKey();
  AndroidInvalidationClient client = clientManager.get(clientKey);
  if (setResponseStatus(client, request, response)) {
    client.start();
  }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:9,代码来源:AndroidInvalidationService.java

示例2: stop

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
@Override
protected void stop(Request request, Response.Builder response) {
  String clientKey = request.getClientKey();
  AndroidInvalidationClient client = clientManager.get(clientKey);
  if (setResponseStatus(client, request, response)) {
    client.stop();
  }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:9,代码来源:AndroidInvalidationService.java

示例3: register

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
@Override
protected void register(Request request, Response.Builder response) {
  String clientKey = request.getClientKey();
  AndroidInvalidationClient client = clientManager.get(clientKey);
  if (setResponseStatus(client, request, response)) {
    ObjectId objectId = request.getObjectId();
    client.register(objectId);
  }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:10,代码来源:AndroidInvalidationService.java

示例4: unregister

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
@Override
protected void unregister(Request request, Response.Builder response) {
  String clientKey = request.getClientKey();
  AndroidInvalidationClient client = clientManager.get(clientKey);
  if (setResponseStatus(client, request, response)) {
    ObjectId objectId = request.getObjectId();
    client.unregister(objectId);
  }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:10,代码来源:AndroidInvalidationService.java

示例5: acknowledge

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
@Override
protected void acknowledge(Request request, Response.Builder response) {
  String clientKey = request.getClientKey();
  AckHandle ackHandle = request.getAckHandle();
  AndroidInvalidationClient client = clientManager.get(clientKey);
  if (setResponseStatus(client, request, response)) {
    client.acknowledge(ackHandle);
  }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:10,代码来源:AndroidInvalidationService.java

示例6: destroy

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
@Override
protected void destroy(Request request, Response.Builder response) {
  String clientKey = request.getClientKey();
  AndroidInvalidationClient client = clientManager.get(clientKey);
  if (setResponseStatus(client, request, response)) {
    client.destroy();
  }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:9,代码来源:AndroidInvalidationService.java

示例7: setResponseStatus

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
/**
 * If {@code client} is {@code null}, sets the {@code response} status to an error. Otherwise,
 * sets the status to {@code success}.
 * @return whether {@code client} was non-{@code null}.   *
 */
private boolean setResponseStatus(AndroidInvalidationClient client, Request request,
    Response.Builder response) {
  if (client == null) {
    response.setError("Client does not exist: " + request);
    response.setStatus(Status.INVALID_CLIENT);
    return false;
  } else {
    response.setStatus(Status.SUCCESS);
    return true;
  }
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:17,代码来源:AndroidInvalidationService.java

示例8: getClientKey

import com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient; //导入依赖的package包/类
private String getClientKey(InvalidationClient client) {
  return ((AndroidInvalidationClient) client).getClientKey();
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:4,代码来源:InvalidationTestListener.java


注:本文中的com.google.ipc.invalidation.external.client.android.AndroidInvalidationClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。