Java Code Examples for com.google.ipc.invalidation.external.client.SystemResources#getListenerScheduler()
The following examples show how to use
com.google.ipc.invalidation.external.client.SystemResources#getListenerScheduler() .
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: InvalidationClientImpl.java From 365browser with Apache License 2.0 | 5 votes |
public InvalidationClientImpl(final SystemResources resources, Random random, int clientType, final byte[] clientName, ClientConfigP config, String applicationName, InvalidationListener listener) { super( // We will make Storage a SafeStorage after the constructor call. It's not possible to // construct a new resources around the existing components and pass that to super(...) // because then subsequent calls on the first resources object (e.g., start) would not // affect the new resources object that the Ticl would be using. resources, // Pass basic parameters through unmodified. random, clientType, clientName, config, applicationName, // Wrap the listener in a CheckingInvalidationListener to enforce appropriate threading. new CheckingInvalidationListener(listener, resources.getInternalScheduler(), resources.getListenerScheduler(), resources.getLogger()) ); // End super. // Make Storage safe. this.storage = new SafeStorage(resources.getStorage()); this.storage.setSystemResources(resources); // CheckingInvalidationListener needs the statistics object created by our super() call, so // we can't provide it at construction-time (since it hasn't been created yet). ((CheckingInvalidationListener) this.listener).setStatistics(statistics); }
Example 2
Source File: InvalidationClientImpl.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
public InvalidationClientImpl(final SystemResources resources, Random random, int clientType, final byte[] clientName, ClientConfigP config, String applicationName, InvalidationListener listener) { super( // We will make Storage a SafeStorage after the constructor call. It's not possible to // construct a new resources around the existing components and pass that to super(...) // because then subsequent calls on the first resources object (e.g., start) would not // affect the new resources object that the Ticl would be using. resources, // Pass basic parameters through unmodified. random, clientType, clientName, config, applicationName, // Wrap the listener in a CheckingInvalidationListener to enforce appropriate threading. new CheckingInvalidationListener(listener, resources.getInternalScheduler(), resources.getListenerScheduler(), resources.getLogger()) ); // End super. // Make Storage safe. this.storage = new SafeStorage(resources.getStorage()); this.storage.setSystemResources(resources); // CheckingInvalidationListener needs the statistics object created by our super() call, so // we can't provide it at construction-time (since it hasn't been created yet). ((CheckingInvalidationListener) this.listener).setStatistics(statistics); }
Example 3
Source File: InvalidationClientImpl.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
public InvalidationClientImpl(final SystemResources resources, Random random, int clientType, final byte[] clientName, ClientConfigP config, String applicationName, InvalidationListener listener) { super( // We will make Storage a SafeStorage after the constructor call. It's not possible to // construct a new resources around the existing components and pass that to super(...) // because then subsequent calls on the first resources object (e.g., start) would not // affect the new resources object that the Ticl would be using. resources, // Pass basic parameters through unmodified. random, clientType, clientName, config, applicationName, // Wrap the listener in a CheckingInvalidationListener to enforce appropriate threading. new CheckingInvalidationListener(listener, resources.getInternalScheduler(), resources.getListenerScheduler(), resources.getLogger()) ); // End super. // Make Storage safe. this.storage = new SafeStorage(resources.getStorage()); this.storage.setSystemResources(resources); // CheckingInvalidationListener needs the statistics object created by our super() call, so // we can't provide it at construction-time (since it hasn't been created yet). ((CheckingInvalidationListener) this.listener).setStatistics(statistics); }