Commit Graph

4540 Commits

Author SHA1 Message Date
Michael Bayne 20c0f0ff3d Regenerated with updated Marshaller and Dispatcher templates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 18:13:34 +00:00
Michael Bayne d25d5e53f1 We're getting very close to having generated ActionScript Service and Listener
interfaces, and Marshallers for same. The remaining snag has to do with the
annoyance of ActionScript not supporting inner classes, which means that
ChatService.TellListener for example has to become ChatService_TellListener.

The code for generating the Java marshaller knows to add an import for
ChatService if some random invocation service interface happens to reference
ChatService.TellListener, but now it needs to be made to know to add an import
for ChatService_TellListener in ActionScript land and it has to do it in a way
that doesn't fuck up the Java code generation. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4397 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 18:12:56 +00:00
Michael Bayne 3305c1b922 Our inherited constructor documentation didn't make much sense.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:17:35 +00:00
Michael Bayne 398767da5f Ran the auto-generator on all our Streamable stuff in Narya. Tidied up the
results.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4395 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:07:04 +00:00
Michael Bayne 8015764c61 Don't look now kids, but it's automatic generation of ActionScript code from
Java. Of course this is a very limited translation facility that is mainly
focused on auto-generating Streamable ActionScript classes from their Java
originals, and it doesn't actually convert method bodies, just field and method
declarations, initial values, and such.

Most of our Streamable classes don't have much in the way of real methods, and
the autogenerator will stick new methods in when they show up on the Java side
so at least we'll *know* that they need to be implemented. And the main thing:
readObject and writeObject are in fact implemented by the code generator so at
least we won't be plagued by annoying streaming errors when we change something
on the Java side and forget to change the ActionScript side.

Next up, auto-generating InvocationService interfaces and InvocationMarshaller
implementations in ActionScript and ActionScript versions of DObjects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4394 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:05:15 +00:00
Michael Bayne d7bf98354e Match abstract classes as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4393 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 02:01:00 +00:00
Michael Bayne 5e55b0b343 Fixed typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4392 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 01:59:57 +00:00
Ray Greenwell 572d5a6555 Oop, we'll want to immediately Stringify any args passed to our constructor,
as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4391 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 01:20:13 +00:00
Ray Greenwell 5e769376f2 Stringify an added element at the time it is added, not at the time
that toString() is called on the buffer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-10-04 01:15:15 +00:00
Ray Greenwell 23f6486bf7 Added clarifying comments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-29 18:40:41 +00:00
Michael Bayne 48faea2ace All VirtualMachineErrors seem worthy of fork sticking. Also re: my previous
checkin, tihs will be a non-issue when we start devoting an entire separate JVM
to each game (which we will have to do for all games that run server code)
because then all a game can do is stick a fork in its own JVM and render itself
unplayable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-29 00:45:58 +00:00
Michael Bayne 57edcd84b6 We have to specifically enumerate the scary errors that we'll let actually
stick a fork in the server otherwise malicious or broken code can generate an
AbstractMethodError or some other error and cause the server to decide to quit.

It may still be possible for malicious code to throw an OutOfMemory error, and
if that's the case then I don't know what we can do to both gracefully get the
fuck out of dodge when things are pear shaped and avoid the wrath of the
kiddies.

Incidentally, it was stupidity, not malice that brought this to my awareness.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-29 00:41:33 +00:00
Ray Greenwell bd8ee0fd4d Bugfix: return undefined, not null, to indicate absence in the map.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-28 19:11:17 +00:00
Ray Greenwell f544a76b62 Added the ManagerCaller that was added a while back on the Java side.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4385 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 23:54:40 +00:00
Ray Greenwell 0650d58006 Improved the debug-mode logging a bit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 23:54:09 +00:00
Michael Bayne eda71de8d3 Added another method that's booching GG games.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 16:59:38 +00:00
Michael Bayne 8676bb1adc Avoid div0 in rare situation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 16:54:13 +00:00
Ray Greenwell 2a71f0c9bc Added getTinyClassName().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-27 00:31:03 +00:00
Jonathan Le Plastrier 11e08c165e I think this is better. Only define the weave taskdef in the two targets we need it. This adds some duplicate code, but we turn the onerror fail back on, so if the library is not found then ant will throw an error and exit. But it will only do this if you try to run the targets which need this taskdef.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4380 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-26 22:52:58 +00:00
Jonathan Le Plastrier cade4b6435 Narya now builds using from dist/lib. Also, the weave taskdef reports a warning if it cannot find the retroweaver jars, instead of preventing ant from running. These changes will need to happen on the other rings as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-26 20:23:05 +00:00
Michael Bayne 16689b51d4 We need these for binary compatibility with existing Game Gardens games. We may
need the two argument versions as well, but I'll wait and see.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4378 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-25 05:27:09 +00:00
Ray Greenwell a3213cdee2 Automatically unwrap any result object that is wrapped.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4377 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-24 23:51:33 +00:00
Ray Greenwell 0709dc9580 Two minor edits to List support.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4376 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-19 01:25:52 +00:00
Michael Bayne afad7dd444 Added support for streaming List and ArrayList natively. A List will be
unmarshalled into an ArrayList on the receiver. Along the way, I improved
support for generic types as arguments to invocation services (which required
one unfortunate "sweeping" warning suppression, but since this is in generated
code, I think we can be sure it won't be doing anything untoward).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-19 00:31:50 +00:00
Ray Greenwell 036271438a Some bits: made the actionscript Observer list cope and furthermore
keep all observers in the list if the 'apply' function you specify
returns void.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4374 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-14 01:48:09 +00:00
Michael Bayne 54d3bb6496 Missed a spot where getStreamer() was called which motivated further changing
around of the interface (I wanted to automatically call getStreamerClass() for
the caller but that turns out not to be possible when unstreaming so fuck it).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4373 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-12 01:09:01 +00:00
Michael Bayne 13bcdf769d Retidied.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-12 00:49:49 +00:00
Michael Bayne 65b14cfdb5 Was using the wrong getDeclaringClass() to get an enum's proper class. Things
are now correct, but unfortunately a little more complicated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-12 00:47:27 +00:00
Michael Bayne eb3c6ae9cf A particular enum value may actually be a derived class of the declared enum
type, but we don't really want to pollute our class <-> id mapping with a bunch
of extra fiddly enum classes, so we stream all enums as instances of their
declared type and let Enum.valueOf() map back to the custom derived type when
it creates an instance during deserialization.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-12 00:32:06 +00:00
Michael Bayne ac5951eaa1 Finally incorporated Par's Enum streaming support, modified to use the string
value to avoid future compatibility problems if someone saves an object to a
database and then later adds a new enum anywhere but at the end of the list,
thereby changing the ordinals.

If you want maximal network efficiency, don't use enums. For most of what we'll
do with them, it doesn't merit having the future incompatibility hitch of
sending the ordinal.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-12 00:04:14 +00:00
Ray Greenwell 5a8b9e14db Lovely varargs, like MessageUtil in samskivert.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4368 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-11 22:16:01 +00:00
Ray Greenwell f4e7fd73f6 Commented out upstream methods for classes that will never use them.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4367 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-11 20:19:11 +00:00
Ray Greenwell bb40bd533a Reverted a recent change: I was shutting down when we were detached from
our parent, but we don't want to do that for most sprites which are
shutdown anyway in a more managed way, and specifically our avatar sprite
is re-used as we move from room to room.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4366 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-08 18:34:12 +00:00
Ray Greenwell b596aa724e We don't need to hash, just use an ArrayList.
ObjectInputStream works in conjunction with a ObjectOutputStream on the
other end. The ObjectOutputStream will always assign class codes starting
at 1 and increasing sequentially from there, so we can look up a class
by index rather than hashing.
Uses less memory and is faster.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4365 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-08 18:02:08 +00:00
Ray Greenwell e973c00b50 Made equals() compare arrays by value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4364 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-08 17:42:58 +00:00
Ray Greenwell 2c84eb9251 Added hexlate() and unhexlate() to StringUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-08 02:30:12 +00:00
Ray Greenwell ddd796431d Pulled mask configuration into its own method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4362 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 23:23:58 +00:00
Ray Greenwell 412a2f21d2 Some bits to make this behave better.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4361 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 21:44:20 +00:00
Ray Greenwell bd306351ee Removed some code that only needs to be on the server-side.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 21:31:34 +00:00
Ray Greenwell 0ed50738a9 Added append() and prepend().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4359 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 21:30:11 +00:00
Ray Greenwell e88abe3751 Whoops, removed stray line.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4358 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 03:14:03 +00:00
Ray Greenwell 796c6d2587 Match change to java class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 03:10:47 +00:00
Michael Bayne 7379cf09db Communicate the client's timezone to the server during the authentication
process and keep that information around in case the server ever wants to know.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 01:56:41 +00:00
Ray Greenwell 70854349af This was missing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-01 01:32:52 +00:00
Ray Greenwell 1461dc1ccc Created a ResultAdapter... but called it ResultWrapper.
There is already a ResultAdapter in util/ that adapts an
invocation service ResultListener into a com.samskivert.util.ResultListener.

Flash can't cope with two classes of the same name in the same library
module, so I named my adapter *Wrapper. For consistency it would be nice
if these were the same in ActionScript and Java, so maybe we'll end up
just renaming the one in util/.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-01 01:10:24 +00:00
Ray Greenwell 8f958e2505 Added truncate().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-01 01:05:23 +00:00
Ray Greenwell 9e1f81ceff Made more compatible with the base class, use object properties to
specify the command name and arg.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4352 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-31 00:12:48 +00:00
Ray Greenwell 0149aa3b1d Rollback last commit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4351 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-30 00:34:07 +00:00
Ray Greenwell a0626f8a3a Pass the authdata returned by the Authenticator into the ClientResolver.
This is actually kind of sketchy, because the resolver can't depend on it
because there are methods to resolve a client object without having an
authenticated connection.
For now, I'll leave this in.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4350 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-30 00:05:22 +00:00
Ray Greenwell 124835193e If the button is a toggle button and no arg has been specified,
pass the value of 'selected' (true or false) as the argument.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-29 20:55:16 +00:00