Commit Graph

23 Commits

Author SHA1 Message Date
Michael Bayne 2293cae094 Added getResource() which searches the bundles in a resource set for the
resources.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1965 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 02:00:36 +00:00
Michael Bayne fd44620d57 Incorporate a hash of the resource URL into the cache directory so that
bundles from one client installation don't overwrite bundles from another.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1827 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-25 17:21:00 +00:00
Walter Korman ed52a5a04a Cleaned up time estimation and file progress calculation. Constrain
progress notification to once every 2.5 seconds in an attempt to reduce
jiggery-pokery when we're just crossing a minute's border and our transfer
rate fluctuates slightly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1791 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-08 23:42:21 +00:00
Walter Korman d08589d88a Provide an estimate of the download time remaining when downloading
bundles.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1763 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-30 09:36:22 +00:00
Michael Bayne a08d08850e Provide access to the source file from which a resource bundle was
created.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1652 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-19 23:31:48 +00:00
Walter Korman 7d7624fc67 Need to synchronize on the lock object before calling download() so that
we don't accidentally notify ourselves nigh-immediately (e.g., if things
are already entirely up to date) before we've begun waiting on the lock
object on the calling thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1601 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-22 23:19:23 +00:00
Walter Korman af8b7bf237 Allow plus or minus five seconds in modification time when comparing
source and destination files for differences since Windows (and probably
other platforms) doesn't set the file modification time to the precise
time requested.  Don't notify the observer when we're finished downloading
all files until we've finished all of our work with the file.  Check the
return value from the call to setLastModified().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1598 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-22 20:45:22 +00:00
Walter Korman dd38c90665 Don't notify observers when we reach 100% completeness until the streams
are closed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1597 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-19 22:19:34 +00:00
Walter Korman 9f641c5796 Download resource bundles asynchronously and provide facilities for
observing bundle downloading progress.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1595 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-19 20:12:23 +00:00
Michael Bayne 76aaa7722a Report that we're downloading a bundle when we set out to do so.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1169 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-01 20:47:28 +00:00
Michael Bayne 4afaa186eb Track some repackaging in the Jakarta libs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1168 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-01 16:49:26 +00:00
Michael Bayne eb52607162 Adjust the last modified time of our cached files to match that of the
server so that we properly report our last modified times when
subsequently doing an If-Modified-Since request.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1125 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-15 19:12:16 +00:00
Michael Bayne 105812725c Allow the specification of the directory in which the resource manager
caches bundle files.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1123 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-15 02:18:18 +00:00
Michael Bayne 2dc3c95b8b Added code to avoid downloading new copies of the resource bundles unless
they've changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1073 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-26 05:28:02 +00:00
Michael Bayne 3042e9c2ad Removed debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@943 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-06 01:47:08 +00:00
Michael Bayne d4e2058ea6 Modified the resource manager to load resource sets not from the file
system but from a URL into a local cache. It presently loads all of the
resources every time the application starts. This will eventually be made
to be more sophisticated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@862 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:00:06 +00:00
Michael Bayne c25741d8e6 Bundles! Have component bundles largely working. Wrote test code and ANT
tasks and XML parsing rule sets all the good stuff. Rewired up all the
cast code to be amenable to bundling and did some other revamping.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@640 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-27 08:09:35 +00:00
Michael Bayne d733a429a9 Don't choke if we throw a security exception trying to get the app root.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@638 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-26 23:48:04 +00:00
Michael Bayne a040ab4832 Added containsResource() and a sensible toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@627 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-20 03:46:28 +00:00
Michael Bayne a8359efde9 Provide the ability to obtain named resource sets.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@626 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-20 00:23:32 +00:00
Michael Bayne 21ed644984 Added support for loading resources from named resource bundles which are
configured relative to an application root which must be provided to the
resource manager at construct time or via the application.root system
property.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@625 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-20 00:21:41 +00:00
Michael Bayne 5feef4694b Load resources from the classpath rather than from a base URL.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-15 02:12:46 +00:00
Michael Bayne 89632aecbd Initial skeleton implementation of the resource manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@59 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-07-18 21:16:12 +00:00