Package util.io

Examples of util.io.Mirror


      try {
        if(DEFAULT_PLUGINS_UPDATE_MIRRORS.length > 0) {
          Mirror[] mirr = new Mirror[DEFAULT_PLUGINS_UPDATE_MIRRORS.length];
         
          for(int i = 0; i < DEFAULT_PLUGINS_UPDATE_MIRRORS.length; i++) {
            mirr[i] = new Mirror(DEFAULT_PLUGINS_UPDATE_MIRRORS[i]);
          }
         
          return Mirror.chooseUpToDateMirror(mirr,null,PLUGIN_UPDATES_FILENAME, "plugins", PluginAutoUpdater.class, mLocalizer.msg("error.additional"," Please inform the TV-Browser team."));
        } else {
          throw exc;
        }
      }catch (Exception exc2) {
        return new Mirror(DEFAULT_PLUGINS_DOWNLOAD_URL);
      }
    }
  }
View Full Code Here


        String[] defaultMirrors = getDefaultMirrors();
        if(defaultMirrors.length > 0) {
          Mirror[] mirr = new Mirror[defaultMirrors.length];

          for(int i = 0; i < defaultMirrors.length; i++) {
            mirr[i] = new Mirror(defaultMirrors[i]);
          }

          return Mirror.chooseUpToDateMirror(mirr,null,"DataHydra", "main", SweDBTvDataService.class, mLocalizer.msg("error.additional"," Please inform the TV-Browser team."));
        } else {
          throw exc;
        }
      }catch (Exception exc2) {
        return new Mirror(DEFAULT_PLUGINS_DOWNLOAD_URL);
      }
    }
  }
View Full Code Here

      String[] defaultMirrors = getDefaultMirrors();
      if(defaultMirrors.length > 0) {
        Mirror[] mirr = new Mirror[defaultMirrors.length];

        for(int i = 0; i < defaultMirrors.length; i++) {
          mirr[i] = new Mirror(defaultMirrors[i]);
        }

        Mirror choosenMirror = Mirror.chooseUpToDateMirror(mirr,null,"Groups.txt", "groups",TvBrowserDataService.class, " Please inform the TV-Browser team.");

        if(choosenMirror != null) {
          return choosenMirror;
        }
      }
    }catch (Exception exc2) {}

    return new Mirror(DEFAULT_CHANNEL_GROUPS_URL);
  }
View Full Code Here

          if (s.length>=5 && s[0].compareTo(getId()) == 0) {
            int n = s.length-4;
            mirrorArr = new Mirror[n];

            for(int i = 0; i < n; i++) {
              mirrorArr[i] = new Mirror(s[i+4], 1);
            }

            break;
          }
View Full Code Here

    // load the mirror list
    Mirror[] serverDefindeMirros = getServerDefinedMirrors();
    Mirror[] mirrorArr = Mirror.loadMirrorList(new File(mDataDir, getId() + "_" + Mirror.MIRROR_LIST_FILE_NAME), mMirrorUrlArr, serverDefindeMirros);

    // Get a random Mirror that is up to date
    Mirror mirror = Mirror.chooseUpToDateMirror(mirrorArr, monitor, getName(), getId(), TvBrowserDataServiceChannelGroup.class, " Please contact the TV data provider for help.");

    if(mirror != null) {
      mLog.info("Using mirror " + mirror.getUrl());

      // Update the mirrorlist (for the next time)
      updateMetaFile(mirror.getUrl(), getId() + "_" + Mirror.MIRROR_LIST_FILE_NAME);

      // Update the groupname file
      updateMetaFile(mirror.getUrl(), getId() + "_info");

      // Update the channel list
      updateChannelList(mirror, true);
      return getAvailableChannels();
    }
View Full Code Here

            }catch(NumberFormatException e) {
              weight = 100;
              mLog.warning("Invalid weight entry in "+fileName+": "+line+" - set to 100 instead");
            }
          }
          mirrorList.add(new Mirror(url, weight));
        }
      }
    }
    catch (Exception exc) {
      throw new PreparationException("Loading "+fileName+" failed", exc);
View Full Code Here

TOP

Related Classes of util.io.Mirror

Copyright © 2018 www.massapicom. 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.