Commit Graph

108 Commits

Author SHA1 Message Date
Michael Bayne 596d2a4708 blank() -> isBlank().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-11-09 04:00:16 +00:00
Michael Bayne 967f99b60c Allow the class loader to which we fall back to be configured in an
already created resource manager. Due to the way the Handler stuff is set
up, only the first resource manager ever created in a JVM will be wired up
to handle resource: URLs and thus we have to be careful to only ever
create one resource manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3499 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-17 19:57:07 +00:00
Eric Lundberg 259870ee81 Reordered some imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3473 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-13 00:35:37 +00:00
Michael Bayne d233a8f27e Log a warning if we fail to delete either the Getdown marker file or the
bundle itself when wiping a bundle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3461 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-04-08 00:05:41 +00:00
Michael Bayne 4bfbb96dfe We need to override hashCode() and equals() because the default
implementations do a fucking DNS lookup on the host of the URL. The degree
to which that violates expectations about the "expense" of calling
hashCode() is so astronomical as to be unexpressible without complicated
metaphor.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3421 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-23 01:56:54 +00:00
Ray Greenwell 74ff1f6fc5 No permissions are needed to load *any* resource from a resource bundle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3417 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-19 00:17:58 +00:00
Ray Greenwell fade675350 Allow resource urls that have a blank resource set specified to
load resources to load from the default sets.
(A normal url would be "resource://<set>/<path>", one using the default set
would be "resource:///<path>". Goofy.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:08:09 +00:00
Michael Bayne bc837ca289 The plot thickens. The resource manager prepends "rsrc/" to anything it
loads, but the sound manager wants to load things directly from the
classpath, so we need to allow it to use the classpath that the resource
manager was configured with to ensure that it did the right thing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:35:43 +00:00
Michael Bayne afabea71ad Big fat Bernie javadoc cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-24 23:08:21 +00:00
Michael Bayne 3bbdef33d7 Do our privileged business in PrivilegedAction wrappers which allows
Java's magical security system to do the right thing (or so I think).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3274 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-15 02:15:02 +00:00
Michael Bayne 6944f479d1 Removed inadvertently checked in test logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3271 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 21:36:03 +00:00
Michael Bayne a6d7764e29 More custom classloader support. We now have a proof-of-concept working so
it's unlikely that the rabbit hole will surprise us with further depth.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3269 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 02:54:26 +00:00
Michael Bayne ad4ac9318a Modified wipeBundle() to allow preservation of the jar file and to wipe
out Getdown's "verified" marker file so that Getdown will recompute the
jar file's MD5 hash and then wipe it out and redownload it only if it is
actually corrupted.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3146 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-18 21:38:22 +00:00
Michael Bayne a9720fd905 LGPLed the library. Hello world.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-27 02:21:06 +00:00
Michael Bayne 63fad5a1e6 Moved attachable URL factory-related comment into the appropriate class.
Added extra special magic to allow the resource: URLs to extract a tile
from an image that is actually made up of a bunch of smaller images. It's
so money.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3083 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-17 00:49:58 +00:00
Ray Greenwell db04c873b2 If our bundle is already ready to go, we may get the notification that it's
ready prior to even waiting for it. Handle that case.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3061 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-14 20:31:33 +00:00
Michael Bayne 0e853085d5 OK boys, we're going in. Revamped the resource manager now that it doesn't
handle downloading of resources, it simply manages them in situ. Getdown
is now responsible for all the downloading.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-14 14:06:46 +00:00
Michael Bayne c7223a89e1 New commons world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3059 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-13 16:37:40 +00:00
Michael Bayne 9160490ffb Made wipeBundle() accessible to external callers, moved a protected method
into its happy place.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3042 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-03 03:21:05 +00:00
Michael Bayne 425e8a6dcb If we fail to resolve our jar file, it is most likely corrupt, so delete
it and allow the resource manager to redownload.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-19 08:09:33 +00:00
Michael Bayne 5b68088b7c Download the properties file ourselves before handing it to Java to parse
into a properties object so that we can log the text if Java chokes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-18 17:41:39 +00:00
Michael Bayne 5282160ab4 Need to set the content length in here as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-17 03:02:55 +00:00
Michael Bayne fc8213493e Alas, such a simple fix isn't going to do the job. We need to be smarter
about handling resources that didn't provide a content length.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3030 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-16 09:44:23 +00:00
Michael Bayne 53eca560f6 Cope with the current situation where PA's servers somehow strip the
content-length header even though the servlet container is providing one.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3029 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-16 09:25:52 +00:00
Michael Bayne 14c9e6bc2c Fail more gracefully in this circumstance, not that there's much we can do.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3027 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-06-15 18:25:13 +00:00
Michael Bayne 32dee3cbaf 405 modified source files and 17,367 lines of diffs later we now enforce
more discipline when handling names in our code base. Any user entered
name should find its way into a Name object as soon as it comes out of a
text field or whatnot, and stay that way until it makes its way into a
text field or into a database record (for which String objects are vastly
simpler because of JORA magic).

Dear God, let me never again make a change this large for the rest of my
mortal life.

Unfortunately, this means we have to keep an eye out for funny business
pretty much everywhere. However, since we will absolutely want to test
market stalls and so forth on Azure, we'll have an opportunity to iron out
any funny business that might fall under the radar during our internal
testing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-03-06 11:29:19 +00:00
Michael Bayne 40e04de557 Pruned imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2974 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:52:16 +00:00
Michael Bayne 6cd4e73720 Import cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2970 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:49:56 +00:00
Michael Bayne 7bccc5f5e3 Make sure we have a version and also do our matching without a regular
expression because Windows \s in paths booch the regex code to the high
heavens.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2922 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-18 18:32:34 +00:00
Michael Bayne f623572a33 Corrected log message.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2917 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-15 20:04:09 +00:00
Michael Bayne 50a3db61d3 The destination file is already versioned so we just replace the version
information with our regular expression.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2916 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-15 19:40:11 +00:00
Michael Bayne 7088a6b7db Removed transitionary code; added code to delete old bundle files from
previous releases that sometimes cannot be deleted because of the
mysterious "no you can't delete a file that you created" Windows bug.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2915 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-15 19:37:32 +00:00
Michael Bayne 9672534004 Make sure the cache and .stamp paths are not versioned. Also ensure we
don't leave any unversioned bundles lying around after a conversion.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2847 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-29 23:09:48 +00:00
Michael Bayne 41ce70349b Revamped the way we handle versioned jar files such that each bundle is
named according to its version number so that when we patch an old version
to create a new version, we don't have to do any renaming, we just create
the new version directly and hopefully avoid this bullshit problem on
Windows where we're unable to rename a goddamned file.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2846 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-29 22:31:55 +00:00
Michael Bayne 7a9f2557f0 Try another strategy if we fail to remain our original file.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2845 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-29 02:42:56 +00:00
Michael Bayne ba26e551bd Differentiate between dynamic resource URLs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2842 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-27 11:43:26 +00:00
Ray Greenwell eca5077375 Do the post-download portion of a bundle immediately after each bundle
instead of waiting for them all to complete.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2830 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-23 20:31:28 +00:00
Michael Bayne 3fadb2b1ea Fucking JarFile throws a SecurityException if there's a signing error
which is *not* an IOException. Thanks guys.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2827 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-22 18:50:27 +00:00
Michael Bayne 73373b8844 Propagate up an exception if we're not able to download the resource
manager config (usually a transient DNS failure).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2812 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-09-24 23:54:59 +00:00
Michael Bayne 6b5542d915 Only read in the current version if we've got both the version file and
the bundle file.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2785 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-20 03:53:35 +00:00
Michael Bayne 026be0505a Check for file existence.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2784 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-20 03:52:36 +00:00
Michael Bayne 693ce550d7 We need to update our last modified time after downloading the resource.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2780 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-18 21:50:03 +00:00
Michael Bayne c78accd506 Minor edit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2775 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-15 23:58:02 +00:00
Michael Bayne c0ea432776 Changed dynamic resource URL handling such that it must be set
programmatically or it will be assumed to be the same as the normal
resource URL.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2774 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-15 23:23:05 +00:00
Michael Bayne 8ab26de8b0 Now that we're closing the jarfile after unpacking it, we can't be poking
around in there for other reasons. We also avoid looking up the entry in
the jar file every time it is requested.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2766 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-11 20:34:21 +00:00
Michael Bayne cb89eaf73d Reorganized so that we notice bundle unpack failure and report the failure
to our bundle download observer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2765 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-09 05:51:12 +00:00
Michael Bayne 36f738949d Made sourceIsReady() more robust and it now returns whether or not it
successfully unpacked its jar file so that we can report bundle download
borkage and retry in the face of potentially transient fuckolas.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2764 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-09 05:42:13 +00:00
Michael Bayne 927881306d Use FileUtil.resuffix().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2763 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-09 05:27:07 +00:00
Michael Bayne 1d3e8247e8 Throw a particular exception when we fail to patch bundles.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2757 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-09 00:31:27 +00:00
Michael Bayne b9341c9430 Break out and report the patching and unpacking phases.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2756 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-09 00:31:14 +00:00