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


Java SystemResources.getNetwork方法代码示例

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


在下文中一共展示了SystemResources.getNetwork方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ProtocolHandler

import com.google.ipc.invalidation.external.client.SystemResources; //导入方法依赖的package包/类
/**
 * Creates an instance.
 *
 * @param config configuration for the client
 * @param resources resources to use
 * @param smearer a smearer to randomize delays
 * @param statistics track information about messages sent/received, etc
 * @param applicationName name of the application using the library (for debugging/monitoring)
 * @param listener callback for protocol events
 */
ProtocolHandler(ProtocolHandlerConfigP config, final SystemResources resources,
    Smearer smearer, Statistics statistics, int clientType, String applicationName,
    ProtocolListener listener, ProtocolHandlerState marshalledState) {
  this.logger = resources.getLogger();
  this.statistics = statistics;
  this.internalScheduler = resources.getInternalScheduler();
  this.network = resources.getNetwork();
  this.listener = listener;
  this.clientVersion = CommonProtos.newClientVersion(resources.getPlatform(), "Java",
      applicationName);
  this.clientType = clientType;
  if (marshalledState == null) {
    // If there is no marshalled state, construct a clean batcher.
    this.batcher = new Batcher(resources, statistics);
  } else {
    // Otherwise, restore the batcher from the marshalled state.
    this.batcher = new Batcher(resources, statistics, marshalledState.getBatcherState());
    this.messageId = marshalledState.getMessageId();
    this.lastKnownServerTimeMs = marshalledState.getLastKnownServerTimeMs();
    this.nextMessageSendTimeMs = marshalledState.getNextMessageSendTimeMs();
  }
  logger.info("Created protocol handler for application %s, platform %s", applicationName,
      resources.getPlatform());
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:35,代码来源:ProtocolHandler.java

示例2: ProtocolHandler

import com.google.ipc.invalidation.external.client.SystemResources; //导入方法依赖的package包/类
/**
 * Creates an instance.
 *
 * @param config configuration for the client
 * @param resources resources to use
 * @param smearer a smearer to randomize delays
 * @param statistics track information about messages sent/received, etc
 * @param applicationName name of the application using the library (for debugging/monitoring)
 * @param listener callback for protocol events
 */
ProtocolHandler(ProtocolHandlerConfigP config, final SystemResources resources,
    Smearer smearer, Statistics statistics, int clientType, String applicationName,
    ProtocolListener listener, TiclMessageValidator2 msgValidator,
    ProtocolHandlerState marshalledState) {
  this.logger = resources.getLogger();
  this.statistics = statistics;
  this.internalScheduler = resources.getInternalScheduler();
  this.network = resources.getNetwork();
  this.listener = listener;
  this.msgValidator = msgValidator;
  this.clientVersion = CommonProtos2.newClientVersion(resources.getPlatform(), "Java",
      applicationName);
  this.clientType = clientType;
  if (marshalledState == null) {
    // If there is no marshalled state, construct a clean batcher.
    this.batcher = new Batcher(resources, statistics);
  } else {
    // Otherwise, restore the batcher from the marshalled state.
    this.batcher = new Batcher(resources, statistics, marshalledState.getBatcherState());
    this.messageId = marshalledState.getMessageId();
    this.lastKnownServerTimeMs = marshalledState.getLastKnownServerTimeMs();
    this.nextMessageSendTimeMs = marshalledState.getNextMessageSendTimeMs();
  }
  logger.info("Created protocol handler for application %s, platform %s", applicationName,
      resources.getPlatform());
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:37,代码来源:ProtocolHandler.java


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