Java Code Examples for com.google.ipc.invalidation.external.client.SystemResources.NetworkChannel#NetworkListener

The following examples show how to use com.google.ipc.invalidation.external.client.SystemResources.NetworkChannel#NetworkListener . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResourcesFactory.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * Sets the network message listener provided by the Ticl. The network calls this method when
 * the Ticl provides it with a listener; the Ticl service later retrieves the listener when
 * it has a network event to communicate to the Ticl.
 */
public void setNetworkListener(NetworkChannel.NetworkListener networkListener) {
  Preconditions.checkState(this.networkListener == null, "Listener already set: %s",
      networkListener);
  this.networkListener = Preconditions.checkNotNull(networkListener);
}
 
Example 2
Source File: ResourcesFactory.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/** Returns the network listener provided by the Ticl. */
NetworkChannel.NetworkListener getNetworkListener() {
  return Preconditions.checkNotNull(networkListener, "network listener not yet set");
}
 
Example 3
Source File: AndroidChannel.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
public void setListener(NetworkChannel.NetworkListener listener) {
  this.listener = Preconditions.checkNotNull(listener);
}
 
Example 4
Source File: ResourcesFactory.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * Sets the network message listener provided by the Ticl. The network calls this method when
 * the Ticl provides it with a listener; the Ticl service later retrieves the listener when
 * it has a network event to communicate to the Ticl.
 */
public void setNetworkListener(NetworkChannel.NetworkListener networkListener) {
  Preconditions.checkState(this.networkListener == null, "Listener already set: %s",
      networkListener);
  this.networkListener = Preconditions.checkNotNull(networkListener);
}
 
Example 5
Source File: ResourcesFactory.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/** Returns the network listener provided by the Ticl. */
NetworkChannel.NetworkListener getNetworkListener() {
  return Preconditions.checkNotNull(networkListener, "network listener not yet set");
}
 
Example 6
Source File: AndroidChannel.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
public void setListener(NetworkChannel.NetworkListener listener) {
  this.listener = Preconditions.checkNotNull(listener);
}