Commit Graph

1046 Commits

Author SHA1 Message Date
Michael Bayne fcedbe90d7 Thread.dumpStack() circumvents whatever logging is configured and writes
directly to stderr. Logging an exception with the associated warning does the
right thing and logs the stack trace via the logging system.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-13 17:35:37 +00:00
Michael Bayne d293fe5140 Fixed comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5316 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 18:19:07 +00:00
Michael Bayne 6866f6b609 Allow things that requireEventThread() to proceed if they are called during the
server initialization phase. Only after the event thread is established is it
unsafe to be wild and wooly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5315 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 18:18:08 +00:00
Michael Bayne e137667f07 Updated some comments, added some sanity checks to registerDispatcher() and
clearDispatcher() as I saw some craziness in the wild.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5314 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 16:57:46 +00:00
Tom Conkling c1442d8b17 Include the Throwable in the warning here
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-12 00:51:01 +00:00
Michael Bayne 1d3122d11c Handle failure properly now that shutdown tries to finish up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-11 20:19:28 +00:00
Michael Bayne 5c3b5e9af3 Finish off what's in our queue before allowing the writer to exit. This ensures
that the LogoffRequest is sent to the server even if we have one or more
pending messages on the writer's queue at the time of logoff().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5306 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-11 20:17:36 +00:00
Michael Bayne eda49af57b Let's just use a runnable there. Having the node action turns out not to be
super useful. If one really needs it they can keep a final reference around.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5304 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-10 02:16:54 +00:00
Michael Bayne 7481cdd5a1 Regenerated services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-10 01:22:56 +00:00
Michael Bayne 2cb05c165d A few things:
- switched to Google Base's Function interface instead of rolling our own
various function interfaces;
- added invokeNodeAction() that invokes directly on a single node with no
checking;
- added an onDropped callback that will be invoked if a node action fails to
match any nodes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5302 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-10 01:16:31 +00:00
Michael Bayne 8ba97d2f70 Switch NodeAction to use the Presents streaming system instead of
Serializable. I wanted to avoid having to declare a bazillion no argument
constructors, but it's too annoying to have to make all the Presents streamable
classes that one naturally wants to send between servers also Serializable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5301 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-09 23:04:35 +00:00
Michael Bayne 01a39e500a No longer need this tracking.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-07 21:00:26 +00:00
Michael Bayne 3385e9ba4a It's not entirely obvious how we should respond to multiple calls to logoff()
fired in such rapid succession that we have not completed processing the first
call before the next one comes in. We could do the cumbersome thing and keep
track of an _isLoggingOff state but that is so inelegant that I can't bear to
do it. I'd rather just cope in the Presents code and put the onus on the caller
not to do wacky things like this.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5296 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-07 16:52:19 +00:00
Michael Bayne 294f0fd1f1 Keep a history of what we do with subscriptions so that we can get some insight
into the thousands of "Missing subscription in unmap" errors that we have been
getting as a matter of course.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5293 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-05 13:12:18 +00:00
Michael Bayne 5c664a2667 Report a bit more information in these strange edge cases.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5292 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-05 12:49:40 +00:00
Michael Bayne beadc8745c Check whether arg unwrapping will result in a cast to a generic type and in
that case, suppress unchecked warnings. We do this on the whole method because
doing it for each argument would vastly complicate things and we can be fairly
confident that this generated code will not have other dangerous casts added to
it that would be hidden by the suppression.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5291 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-04 21:02:15 +00:00
Michael Bayne 0b6d823e8a Fixed ChainedResultListener declaration.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5281 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-01 13:19:24 +00:00
Charlie Groves 2cdac9dfcb Need to include the service class when linking to a listener defined in it. This makes Eclipse happy. Javadoc emits warnings in the current form without the service class, in the new form with <service>.<listener> and also with <service>#<listener>. I just want to please javadoc, but I don't know how.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5278 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-30 18:16:12 +00:00
Charlie Groves f0c529bb19 generate a little less needless whitespace
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5277 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-30 17:21:25 +00:00
Michael Bayne bda7d04f4c Peskily, Eclipse and javac disagreed about whether this unchecked suppression
was necessary (javac claimed it was, Eclipse claimed it wasnt'). Fortunately,
we can do everything with Class<FooClient> methods that avoid the need for
supression entirely.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5275 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-30 13:05:16 +00:00
Michael Bayne 725f656197 Fixed a bunch of type safety bits pointed out by the latest version of Eclipse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5274 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-30 12:58:51 +00:00
Jamie Doornbos c17634f7a8 Removed illegal @link asdoc directive from service generation templates
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5271 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-30 00:20:13 +00:00
Dave Hoover 8a8b615f9d Clean up some warnings I'm getting in super-pedantic mode.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5268 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-28 17:23:07 +00:00
Michael Bayne 93fb7b01f7 Fixed some unused variables, unused imports, type variable hiding, tricky
generic array type handling and other niggling bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5267 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-26 20:40:20 +00:00
Michael Bayne dde4e4bfdf Presents supports streaming lists natively now, so just use an array list.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5254 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 15:06:36 +00:00
Michael Bayne 0a893e1de1 ZOMG, Narya now perfectly passes our coding standards as enforced by
CheckStyle. The checks are slightly looser than I'd like but way better than
nothing and we get a bunch of other useful warnings like shadowed names and
other handy bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5253 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 14:36:54 +00:00
Michael Bayne 5c4ab96880 Styley stylopolis.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5252 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 14:01:51 +00:00
Michael Bayne 706b85a0e4 Regenerated with new code that properly simplifies generic type arguments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 13:48:37 +00:00
Michael Bayne e1ca08dde8 Simplified (and improved) name simplification.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5250 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 13:48:10 +00:00
Michael Bayne 67ce73b61d More style cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5249 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 13:39:42 +00:00
Michael Bayne c743432676 More style changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5248 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 13:02:13 +00:00
Michael Bayne 09f8a25876 More style-related cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5247 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 12:51:17 +00:00
Michael Bayne 0aa0e48c28 The provider needs to import the service for all of our javadoc to work. If
Eclipse doesn't know about javadoc, we should file a bug.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5246 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 12:50:15 +00:00
Michael Bayne 85b26867e3 Put this all on one line to avoid weird whitespace.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5245 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 12:48:57 +00:00
Michael Bayne 219ab38b77 Widening; nixed import of receiver as it's not needed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5244 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-22 12:33:37 +00:00
Dave Hoover bd285bafc7 Teach that switch statement about all values for that enum.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5243 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-21 18:24:04 +00:00
Dave Hoover 6b1d65553f And finally, narya gets the imports/overrides/regen love.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5241 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-18 23:20:17 +00:00
Michael Bayne e41dda3018 Style fixes and import pruning. Beware, CheckStyle is (finally) coming to town.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5240 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-18 18:32:59 +00:00
Dave Hoover 1578adceb1 Unless I'm missing something, those bits of generated code don't need those extra imports.
I've rerun the code generators without those in vilya & yohoho and everything seems happy,
so let's give it a whirl.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5225 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-10 18:39:29 +00:00
Jamie Doornbos ffeb20b2c7 Removed hiding member variable
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5217 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-02 23:24:45 +00:00
Michael Bayne 5b5d39601b Added requireEventThread and refuseEventThread.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5213 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-30 11:36:17 +00:00
Michael Bayne f043a81ee4 Maps cleanup; inject dependencies into NodeAction instances.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5211 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 14:09:54 +00:00
Michael Bayne 556c9024b8 Nixed unused imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5209 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 12:44:57 +00:00
Michael Bayne d1143a2483 Make the NodeRepository injectable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5208 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 12:44:28 +00:00
Michael Bayne 09722edcd7 Nix some unused imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5202 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 12:37:06 +00:00
Michael Bayne 8d6635e8e0 Type the marshaller and associated registry methods so that we don't have to
downcast every time we register an invocation service provider.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5201 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 12:36:21 +00:00
Michael Bayne d9cdb5ae3b Move this up with its public friends.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5200 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 11:22:58 +00:00
Michael Bayne 740cd4c76a Use Maps.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5199 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 11:10:05 +00:00
Michael Bayne d689839442 Log a newly created exception to obtain our stack trace instead of using
Thread.dumpStack() which goes directly to stderr rather than through the
logging system.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5198 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 11:07:36 +00:00
Jamie Doornbos 39f408e2a8 weirdly, we have exactly one service that uses Integer instead of int for some reason
TODO: provide a convertAllLangTypes method instead of adding new types as they crop up

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5189 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-23 18:44:09 +00:00