like Groovy and JRuby. Created a DynamicEventDispatcher that automatically maps
attribute, element and set events to methods. Say you have a field:
public DSet occupantInfo;
you can create a method in any class:
public void occupantInfoAdded (BodyObject source, OccupantInfo entry);
and then bind that class as a listener using the dynamic event dispatcher:
_myobj.addListener(new DynamicEventDispatcher(object));
I also created a nicer replacement for the MessageHandler system which is
clunky but still way simpler than using a full InvocationService. Basically we
dispatch MessageEvent as if it were a method call.
For example, in AtlantiManager I define:
public void placeTile (BodyObject placer, AtlantiTile tile)
which receives a request by a player to place a tile on their turn. Then in
AtlantiController, I simply call:
_atlobj.manager.invoke("placeTile", tile);
Of course, in JRuby and Groovy, that's going to look like:
_atlobj.manager.placeTile(tile);
which is all part of the fun.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4344 542714f4-19e9-0310-aa3c-eee0fc999fb1
distributed objects by reflection since we don't allow clients to create
objects, furthermore we needn't do it asynchronously. The object creation
methods were moved into the server-side only interface and made "immediate", so
the caller creates a derived instance of DObject and registers it with the
system instead of creating it with a Subscriber callback.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4342 542714f4-19e9-0310-aa3c-eee0fc999fb1
Also, while I was in there, added some safety so we don't lose track of shutdownIntervals and let them run amuck.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4295 542714f4-19e9-0310-aa3c-eee0fc999fb1
These are the preferred way to get instances of Boolean, Byte,
Short, Character, Integer, Long, Float, and Double object.
It's always made sense for Boolean objects, and with 1.5 these factory
methods were blessed as the proper way to get instances unless one
absolutely needed a distinct object.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4145 542714f4-19e9-0310-aa3c-eee0fc999fb1
PlaceObject. Created a default AccessController that is slightly more strict
than the CrowdServer-wide default in that it only allows place occupants to
subscribe to a PlaceObject (a motivated and resourceful player could otherwise
listen in on place chat everywhere in the game if they so desired; with a
custom client, of course).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4079 542714f4-19e9-0310-aa3c-eee0fc999fb1
- OccupantInfo is created by the BodyObject
- the BodyObject is passed to the OI constructor and it uses information
therefrom to configure itself
- the PlaceManager are no longer responsible for indicating the type of
OccupantInfo to use or how to populate it.
This makes much more sense as the same type of OccupantInfo is generally used
across the entire system and it's annoying to have to have every PlaceMaanger
derived class know the type of OccupantInfo to create and know how to
initialize it. The one drawback is that only information from the BodyObject
can be used to populate the OccupantInfo, unpublished server-side only
information cannot be used (unless its stuffed into a transient field in the
BodyObject).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3774 542714f4-19e9-0310-aa3c-eee0fc999fb1
applicable, as it will only otherwise get checked when users leave the place.
It's possible that we'll load and nobody will ever enter.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3763 542714f4-19e9-0310-aa3c-eee0fc999fb1
as their authentication name (which we leave in BodyObject.username). This
turns out to be simpler than the system we adopted for Yohoho wherein we
replace the player's user object after they select a character, but converting
to this sort of system is way more work than would be worth it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3758 542714f4-19e9-0310-aa3c-eee0fc999fb1
There is no more SafeInterval, instead Intervals can be constructed with a RunQueue to use for expiring.
PresentsDObjectMgr implements RunQueue.
Client has a getRunQueue() method to get the client side RunQueue.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3283 542714f4-19e9-0310-aa3c-eee0fc999fb1
- Repackaged crowd/chat
- All messages are delivered to the client via ChatMessage messages,
including tells.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2631 542714f4-19e9-0310-aa3c-eee0fc999fb1
react to player disconnection, idle (implementation still pending), and
reconnection appropriately. Added PlaceManager.bodyUpdated().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1831 542714f4-19e9-0310-aa3c-eee0fc999fb1
check; so we give them a callback for such contingencies.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1780 542714f4-19e9-0310-aa3c-eee0fc999fb1
initialization process, whether or not it actually wants to be created,
and allow it to abort the whole deal if it doesn't.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1777 542714f4-19e9-0310-aa3c-eee0fc999fb1
method invocation services and converted everything to the new style.
Could this be my biggest checkin ever?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1642 542714f4-19e9-0310-aa3c-eee0fc999fb1
errors to report the "place" in which the error happen. The SceneManager
overrides this to include scene information. Scrupulous use will make log
messages much more scrutable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1514 542714f4-19e9-0310-aa3c-eee0fc999fb1
it holds and we can now create custom occupant info classes depending on
the body that is entering the place.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1270 542714f4-19e9-0310-aa3c-eee0fc999fb1
array element update support. (Arrays have elements, sets have entries.)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1133 542714f4-19e9-0310-aa3c-eee0fc999fb1
classes is only going to become more common, I've gone and created a
comprehensive facility for creating and using delegates in the place
controller and manager as well as the game controller and manager. With
the pattern nicely set, it is also easy to extend to controller/managers
further up the hierarchy that might need to delegate special methods of
their own. Whee!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@994 542714f4-19e9-0310-aa3c-eee0fc999fb1
place object death and lets the place registry know to unmap it during its
shutdown process.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@544 542714f4-19e9-0310-aa3c-eee0fc999fb1