| | |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.webstart; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.MalformedURLException; |
| | | import java.net.URL; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | import javax.jnlp.DownloadService; |
| | |
| | | import javax.jnlp.ServiceManager; |
| | | import javax.jnlp.UnavailableServiceException; |
| | | |
| | | |
| | | import org.opends.quicksetup.ApplicationException; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.ReturnCode; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.util.SetupUtils; |
| | | |
| | | import static org.opends.quicksetup.util.Utils.*; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | import static com.forgerock.opendj.util.OperatingSystem.isWindows; |
| | | import static com.forgerock.opendj.cli.Utils.getThrowableMsg; |
| | |
| | | isFinished = false; |
| | | Thread t = new Thread(new Runnable() |
| | | { |
| | | @Override |
| | | public void run() |
| | | { |
| | | try |
| | |
| | | } |
| | | else |
| | | { |
| | | ratio = (100 / urls.length); |
| | | ratio = 100 / urls.length; |
| | | } |
| | | ratios[i] = ratio; |
| | | totalRatios += ratio; |
| | |
| | | } |
| | | |
| | | |
| | | for (int i = 0; i < urls.length && (getException() == null); i++) |
| | | for (int i = 0; i < urls.length && getException() == null; i++) |
| | | { |
| | | if (i == 0) |
| | | { |
| | |
| | | return ex; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void downloadFailed(URL url, String version) |
| | | { |
| | | ex = |
| | |
| | | INFO_DOWNLOADING_ERROR.get(url), null); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void progress(URL url, String version, long readSoFar, long total, |
| | | int overallPercent) |
| | | { |
| | |
| | | status = Status.DOWNLOADING; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void upgradingArchive(URL url, String version, int patchPercent, |
| | | int overallPercent) |
| | | { |
| | |
| | | status = Status.UPGRADING; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void validating(URL url, String version, long entry, long total, |
| | | int overallPercent) |
| | | { |