Commit Graph

4669 Commits

Author SHA1 Message Date
Michael Bayne 6db6eef7e1 Close our bound socket when the connection manager is shutdown. New-styled
logging.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4727 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-13 17:48:42 +00:00
Ray Greenwell e7379cd41a Fixed a bug: the 'old value' of some events were not getting set
because the oldValue variable didn't contain UNSET_OLD_VALUE, but
rather null because it was set that way in the constructor.
Additionally, some of the constructors would only set the old value
if it wasn't null, which is also wrong because an old value can
easily be null.

We could probably just rip apart most of this code, because for
the most part events are not constructed on the client anyway. We might be
able to get away with just making all the event constructors 0 arg, and
then we don't have to worry about UNSET_OLD_VALUE, we just always apply.
But let's try to be more similar to the Java code, and so now I emulate
multiple constructors by checking how many arguments were provided and
not configuring event-specific data if it wasn't actually provided
to the constructor.

Note: none of this would be necessary if we could just declare a constructor:

public function AttributeChangedEvent (
    targetOid :int = 0, name :String = null, value :Object = null,
    oldValue :Object = UNSET_OLD_VALUE);

But you can't use constants as the default value in a parameter list
(commence being boggled) so we have to use null instead of UNSET_OLD_VALUE
as the default value, and then check the 'arguments' special variable to
see if someone passed in null or whether it came from the default value. Aiya.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4726 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-06-04 22:00:48 +00:00
Jonathan Le Plastrier 5f0ffa11d4 Fix the docs link.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4725 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-30 22:26:24 +00:00
Ray Greenwell fed8aceae5 Use StringUtil.parseInteger.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4724 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-25 21:19:50 +00:00
Ray Greenwell df27e347f0 Created parseInteger() as a replacement for the built-in parseInt(),
which parses a String like " 7pigs" as the value 7.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4723 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-25 21:19:31 +00:00
Ray Greenwell 32740e654a Fixed numeric key-modifying lookups.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4722 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-25 20:06:11 +00:00
Ray Greenwell cef7e14583 Tracked down the bug that was causing some composed translations
to come out as "mmmmmmmmmmmmmmmmmmmmmm".


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4721 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-25 19:42:03 +00:00
Ray Greenwell 8b85e8a940 Allow de-capitalizing to be turned off by subclasses.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4720 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-25 18:16:32 +00:00
Ray Greenwell c29a7b007b Um.
I'm not sure what I was thinking: we'll never want to auto-recognize
command:// urls in text. In the places where we'll use them we'll
format things ourselves.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4719 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-23 21:21:06 +00:00
Michael Bayne 8206753188 A we bit of (not so) new logging world order conversion.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4718 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-23 18:40:15 +00:00
Michael Bayne 17e36673d0 Beans, frank!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4717 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-18 23:23:13 +00:00
Ray Greenwell f2e1d94e7a Comment fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4716 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-18 04:51:44 +00:00
Michael Bayne 9bcca099ac Implemented a Ray-proposed solution where we keep track of events that were
(pre-applied and) posted before we received our object but processed (and hence
dispatched to us) after we received our object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4715 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-18 03:37:14 +00:00
Michael Bayne db3fe80e9d No need for that variable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4714 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-18 02:47:25 +00:00
Michael Bayne 0c90344e6b Widened, added a workaround for a "doesn't actually break anything and is too
complex to properly fix right now" bug.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4713 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-18 02:46:47 +00:00
Michael Bayne c2fb8f99c7 Instead of magically creating the ManagerCaller and using the DObjectManager
provided to the object when it was created, have the LocationDirector
initialize the manager caller when it receives the PlaceObject and have it use
its client distributed object manager which tags events with the proper
clientOid. This still prevents us from running multiple clients in the same VM,
so this will probably all have to change again but this works for now.

Also some widening.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4712 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-15 00:27:07 +00:00
Michael Bayne d9f76c98fd Some of the widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4711 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-15 00:26:27 +00:00
Michael Bayne 91f8ac6fa6 Turns out Sun has secret support for handling signals, so we'll use that
instead of our native library. I've left the native library support in in case
the Sun stuff is not available, but that's so extremely unlikely in a server
environment (IBM recreates Sun's signal handling in their VM because it's so
dang useful) that I should probably just nix it altogether and simplify things.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4710 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-14 21:36:58 +00:00
Ray Greenwell 9ea934cd82 Added support for recognizing "command://" urls.
Sigh. So not standard.
I suppose I could devise a whole system for registering protocols, and
adding registered protocols to this regexp, but we'll never have another
one of these and this is just easier for now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4709 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-14 20:47:33 +00:00
Charlie Groves d9eaa65c23 add @Override to getReceiverCode and dispatchNotification so running genreceiver doesn't step all over Dave's auto @Override adder
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4708 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-11 18:54:25 +00:00
Nathan Curtis 01b43deb6e Line -> LineSegment
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4707 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-10 22:00:24 +00:00
Michael Bayne 96dd2deba3 For now don't use the generated field accessors unless we're running in a
sandbox. They should work exactly the same but there seem to be remaining
niggles, so we'll iron those out without impacting other projects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4706 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-09 21:52:47 +00:00
Michael Bayne 84855f8fe0 Enhanced debuggery, reenabled new streaming bits because now they should really
really work.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4705 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-09 01:17:13 +00:00
Michael Bayne cf949410ce We don't need to read and write wrap straight up calls to readObject() and
writeObject() as that handles nulls for us (and of course because that's how
it's done when streaming using reflection).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4704 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-09 01:15:28 +00:00
Michael Bayne 66a4151c86 More problems!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4703 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-09 01:02:11 +00:00
Ray Greenwell 5b07cd55f9 - Added a method to get the point of intersection.
- Added getLength().
- Took out crazy null-tolerance in equals(). If your line is malformed,
  you may get NPE's trying to test equality with another line. Fix your line.

These are line segments anyway. We should maybe rename this
class to LineSegment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4702 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-09 00:26:14 +00:00
Michael Bayne ef43b9d41a Re-revamp. I may re-re-revamp later to eliminate the reflection based streaming
altogether as that also solves the "Class.getDeclaredFields() is not required
to return fields in declaration order" problem which has been looming. However,
this should work for now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4701 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-09 00:20:35 +00:00
Nathan Curtis 0cba1203c9 implement equalable
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4700 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-09 00:02:36 +00:00
Michael Bayne dcffc5f54d Disable this for now until the instrumented methods are working properly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4699 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 20:47:53 +00:00
Michael Bayne ef384f2a95 Streamables show up all over the place in Narya.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4698 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 19:57:41 +00:00
Michael Bayne 9e0babe2e1 We need the fully qualified class name.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4697 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 19:50:05 +00:00
Michael Bayne 4c73734afb Well pants, we can't not build the instrumentation code because we want to run
it on Narya itself and there's no way to say "only execute this task if the
supplied condition is met" without bringing in extra bullshit from ant-contrib
which I really don't want to do.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4696 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 19:24:35 +00:00
Michael Bayne 2afd7b2e29 Let's actually use them fancy little methods.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4695 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 19:19:33 +00:00
Michael Bayne 8df35549df Only build the instrumenter if we have the necessary dependencies.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4694 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 19:19:20 +00:00
Michael Bayne dac3462f20 Sneaky sneaky.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4693 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 18:59:58 +00:00
Michael Bayne 47273749c8 New plan! We now post-process our class files and add individual public reader
and writer methods for private and protected fields. This will allow us to
preserve the current read and write ordering and in the future when we "fix"
read and write ordering, we won't be fucked by a bunch of generated methods
that force the ordering. (Someone is using Presents on the CLR which turns out
to take advantage of the loose specification of Class.getDeclaredFields() and
not return them in declaration order, yay!).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4692 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-07 18:59:42 +00:00
Michael Bayne df9f13afa6 Move libs-incl.xml into etc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4691 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-06 00:34:06 +00:00
Michael Bayne ae1e7dc4a8 Scratch that. The plot is thicker. I'll have to take the pain to support mixed
readObject()/no-readObject() havers otherwise everyone everywhere will have to
generate streamer methods which is way too big a PITA. Grumble.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4690 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:25:41 +00:00
Michael Bayne a60a71552a Generated readObject()/writeObject(), widened some things along the way.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4689 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:17:41 +00:00
Michael Bayne ea8bf25c0a Some fiddling to handle classes that extend SimpleStreamableObject.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4688 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:17:24 +00:00
Michael Bayne 1ec22804da Oops, we need to do things a little differently.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4687 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:08:04 +00:00
Michael Bayne 410d85d49d A task to generate readObject() and writeObject() for Streamable classes (for
use in non-sandboxed environments). Unfortunately we have to do this for all
Streamable classes, not just the ones that have protected/private members
because we need to be able to call super.readObject() and have that exist even
if our superclass contains only public members.

Doing magic streaming with combinations of classes that do and don't have
readObject() would start to get extremely complicated, particularly if the base
class had readObject() an intermediate class had none, then a later class had
one again. Madness. Doing things with compiled methods will be faster anyway...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4686 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:04:50 +00:00
Michael Bayne 77fef0c22e Factored management of "generated fields" and "generated methods" blocks into a
utility class.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4685 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:02:31 +00:00
Michael Bayne 3036bcb70d Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4684 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:02:03 +00:00
Michael Bayne 63c5449b00 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4683 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:01:48 +00:00
Michael Bayne 64da3b6229 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4682 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 22:01:32 +00:00
Michael Bayne 4d455eb6e6 _usermap is referenced by both the conmgr and dobjmgr threads, so access to it
must be synchronized.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4681 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 02:25:03 +00:00
Michael Bayne 69485a88ee Widened, fixed documentation and nixed unneeded runnable posting for
clientSessionDidEnd() which is called on the dobjmgr thread directly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4680 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-04 02:11:33 +00:00
Michael Bayne bd8ad47153 Need a toString() here too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4679 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-03 22:56:54 +00:00
Nathan Curtis 5acc2b767a implement toString
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4678 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-05-03 20:38:21 +00:00