本文整理汇总了Java中javax.jnlp.DownloadServiceListener类的典型用法代码示例。如果您正苦于以下问题:Java DownloadServiceListener类的具体用法?Java DownloadServiceListener怎么用?Java DownloadServiceListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DownloadServiceListener类属于javax.jnlp包,在下文中一共展示了DownloadServiceListener类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadExtensionPart
import javax.jnlp.DownloadServiceListener; //导入依赖的package包/类
@Override
public void loadExtensionPart (URL url,
String string,
String string1,
DownloadServiceListener dl)
throws IOException
{
logger.debug(
"loadExtensionPart url: {}, string: {}, string1: {}, dl: {}",
url,
string,
string1,
dl);
if (service != null) {
service.loadExtensionPart(url, string, string1, dl);
}
}
示例2: loadResource
import javax.jnlp.DownloadServiceListener; //导入依赖的package包/类
@Override
public void loadResource (URL url,
String string,
DownloadServiceListener dl)
throws IOException
{
logger.debug(
"loadResource url: {}, string: {}, dl: {}",
url,
string,
dl);
if (service != null) {
service.loadResource(url, string, dl);
}
}
示例3: downloadInstallerComponent
import javax.jnlp.DownloadServiceListener; //导入依赖的package包/类
/** Download data component JAR */
static public boolean downloadInstallerComponent() {
DownloadService downloadService = Config.getDownloadService();
DownloadServiceListener listener = downloadService.getDefaultProgressWindow();
String compName = Config.getInstallerLocation();
String compVer = Config.getInstallerVersion();
try {
URL codebase = Config.getBasicService().getCodeBase();
URL url = new URL(codebase, compName);
String urlstr = url.toString();
if (!downloadService.isResourceCached(url, compVer)) {
// The installFailed string is only for debugging. No localization needed
Config.trace("Downloading: " + urlstr);
// Do download
downloadService.loadResource(url, compVer, listener);
}
} catch(IOException ioe) {
Config.trace("Unable to download: " + compName + "/" + compVer);
return false;
}
return true;
}
示例4: getDefaultProgressWindow
import javax.jnlp.DownloadServiceListener; //导入依赖的package包/类
@Override
public DownloadServiceListener getDefaultProgressWindow ()
{
DownloadServiceListener res = null;
if (service != null) {
res = service.getDefaultProgressWindow();
}
logger.debug("getDefaultProgressWindow => {}", res);
return res;
}
示例5: loadPart
import javax.jnlp.DownloadServiceListener; //导入依赖的package包/类
@Override
public void loadPart (String string,
DownloadServiceListener dl)
throws IOException
{
logger.debug("loadPart string: {}, dl: {}", string, dl);
if (service != null) {
service.loadPart(string, dl);
}
}