aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/services/XDownloadService.java
blob: 8d2f6d3571984624ae5ec465c61bc777c45b7b0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Copyright (C) 2001-2003 Jon A. Maxwell (JAM)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

package net.sourceforge.jnlp.services;

import java.io.*;
import java.net.*;
import java.util.*;
import java.lang.ref.*;
import javax.jnlp.*;

import net.sourceforge.jnlp.*;

/**
 * The DownloadService JNLP service.
 *
 * @author <a href="mailto:jmaxwell@users.sourceforge.net">Jon A. Maxwell (JAM)</a> - initial author
 * @version $Revision: 1.7 $
 */
class XDownloadService implements DownloadService {

    protected XDownloadService() {
    }

    // comments copied from DownloadService interface

    /**
     * Returns a listener that will automatically display download
     * progress to the user.
     */
    public DownloadServiceListener getDefaultProgressWindow() {
        return null;
    }

    /**
     * Returns whether the part in an extension (specified by the
     * url and version) is cached locally.
     */
    public boolean isExtensionPartCached(URL ref, String version, String part) {
        return true;
    }

    /**
     * Returns whether the parts in an extension (specified by the
     * url and version) are cached locally.
     */
    public boolean isExtensionPartCached(URL ref, String version, String[] parts) {
        return true;
    }

    /**
     * Returns whether the part of the calling application is cached
     * locally.  If called by code specified by an extension
     * descriptor, the specified part refers to the extension not
     * the application.
     */
    public boolean isPartCached(String part) {
        return true;
    }

    /**
     * Returns whether all of the parts of the calling application
     * are cached locally.  If called by code in an extension, the
     * part refers the the part of the extension not the
     * application.
     */
    public boolean isPartCached(String[] parts) {
        return true;
    }

    /**
     * Returns whether the resource is cached locally.  This method
     * only returns true if the resource is specified by the calling
     * application or extension.
     */
    public boolean isResourceCached(URL ref, String version) {
        return true;
    }

    /**
     * Downloads the parts of an extension.
     *
     * @throws IOException
     */
    public void loadExtensionPart(URL ref, String version, String[] parts, DownloadServiceListener progress) throws IOException {
    }

    /**
     * Downloads a part of an extension.
     *
     * @throws IOException
     */
    public void loadExtensionPart(URL ref, String version, String part, DownloadServiceListener progress) throws IOException {
    }

    /**
     * Downloads the parts.
     *
     * @throws IOException
     */
    public void loadPart(String[] parts, DownloadServiceListener progress) throws IOException {
    }

    /**
     * Downloads the part.
     *
     * @throws IOException
     */
    public void loadPart(String part, DownloadServiceListener progress) throws IOException {
    }

    /**
     * Downloads a resource.
     *
     * @throws IOException
     */
    public void loadResource(URL ref, String version, DownloadServiceListener progress) throws IOException {
    }

    /**
     * Notify the system that an extension's part is no longer
     * important to cache.
     *
     * @throws IOException
     */
    public void removeExtensionPart(URL ref, String version, String part) throws IOException {
    }

    /**
     * Notify the system that an extension's parts are no longer
     * important to cache.
     *
     * @throws IOException
     */
    public void removeExtensionPart(URL ref, String version, String[] parts) throws IOException {
    }

    /**
     * Notifies the system that a part  is no longer important to
     * cache.
     *
     * @throws IOException
     */
    public void removePart(String part) throws IOException {
    }

    /**
     * Notifies the system that the parts  is no longer important to
     * cache.
     *
     * @throws IOException
     */
    public void removePart(String[] parts) throws IOException {
    }

    /**
     * Notifies the system that the resource is no longer important
     * to cache.
     *
     * @throws IOException
     */
    public void removeResource(URL ref, String version) throws IOException {
    }

}