Examples of USKCallback


Examples of freenet.client.async.USKCallback

   *            The Sone download to notify on updates
   */
  public void registerUsk(final Sone sone, final SoneDownloader soneDownloader) {
    try {
      logger.log(Level.FINE, String.format("Registering Sone “%s” for USK updates at %s…", sone, sone.getRequestUri().setMetaString(new String[] { "sone.xml" })));
      USKCallback uskCallback = new USKCallback() {

        @Override
        @SuppressWarnings("synthetic-access")
        public void onFoundEdition(long edition, USK key, ObjectContainer objectContainer, ClientContext clientContext, boolean metadata, short codec, byte[] data, boolean newKnownGood, boolean newSlotToo) {
          logger.log(Level.FINE, String.format("Found USK update for Sone “%s” at %s, new known good: %s, new slot too: %s.", sone, key, newKnownGood, newSlotToo));
View Full Code Here

Examples of freenet.client.async.USKCallback

   *
   * @param sone
   *            The Sone to unregister
   */
  public void unregisterUsk(Sone sone) {
    USKCallback uskCallback = soneUskCallbacks.remove(sone.getId());
    if (uskCallback == null) {
      return;
    }
    try {
      logger.log(Level.FINEST, String.format("Unsubscribing from USK for %s…", sone));
View Full Code Here

Examples of freenet.client.async.USKCallback

   *            The URI to watch
   * @param callback
   *            The callback to call
   */
  public void registerUsk(FreenetURI uri, final Callback callback) {
    USKCallback uskCallback = new USKCallback() {

      @Override
      public void onFoundEdition(long edition, USK key, ObjectContainer objectContainer, ClientContext clientContext, boolean metadata, short codec, byte[] data, boolean newKnownGood, boolean newSlotToo) {
        callback.editionFound(key.getURI(), edition, newKnownGood, newSlotToo);
      }
View Full Code Here

Examples of freenet.client.async.USKCallback

   *
   * @param uri
   *            The URI to unregister the USK watcher for
   */
  public void unregisterUsk(FreenetURI uri) {
    USKCallback uskCallback = uriUskCallbacks.remove(uri);
    if (uskCallback == null) {
      logger.log(Level.INFO, String.format("Could not unregister unknown USK: %s", uri));
      return;
    }
    try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.