obtain containment and a stack of specifically typed outer class references to
accomplish what we need without misleading casts.
This will require changes to Yohoho which I shall make forthwith.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6320 542714f4-19e9-0310-aa3c-eee0fc999fb1
1. CrowdPermissionPolicy is an object that lives inside a BodyObject, thus it
cannot use server services like dependency injection, nor BodyLocator. However,
that's not a problem because it will never be used by a ClientObject that is
not a BodyObject. If there were a way to enforce with parameterized types that
it only ever be used in conjunction with a BodyObject, I'd do that, but
parallel inheritance hierarchies are not something that any OO type system I'm
aware of can reason about.
2. ClientResolver and its children are not singletons. One is created for each
client resolution process.
I have certainly fallen prey to the same errors during enthusiastic reactions:
it looks like a rose, it has thorns like a rose, oh wait, it's a blackberry.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6319 542714f4-19e9-0310-aa3c-eee0fc999fb1
from BodyObject, then it's your responsibility to make sure that your
BodyObject carries your Crowd permissions. Checking the ClientObject for your
Crowd permissions and then using those on your (separate) BodyObject is too
weird.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6318 542714f4-19e9-0310-aa3c-eee0fc999fb1
This client-side commit matches the new BodyLocator.forClient() method on the server by the addition of CrowdClient.bodyOf(), which should be subclassed by anyone who wants to do anything fancy.
The default implementation is just for the client to cast itself to BodyObject, matching the default (and historical) implementation in BodyLocator.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6317 542714f4-19e9-0310-aa3c-eee0fc999fb1
* Rename PrefixServer.Module classes to PrefixModule. They all implement guice's Module, and it's
hard to pass a class around as its interface if they share a name.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6303 542714f4-19e9-0310-aa3c-eee0fc999fb1
errors with duplicate receiver entries on reconnect in Spiral Knights, and
I'm hoping this will fix them.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6301 542714f4-19e9-0310-aa3c-eee0fc999fb1
the real source code. That's where reusable classes live. Amazing!
Also cleaned up some build.xml bits and nixed the Retroweaver stuff. I thought
we might have still been using that, but then I saw the hardcoded path to
/usr/local/jdk1.4 and knew that it couldn't be so.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6285 542714f4-19e9-0310-aa3c-eee0fc999fb1
The big win is that getKey() now exists on each of those event types.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6278 542714f4-19e9-0310-aa3c-eee0fc999fb1
The presents-specific portions of ConnectionManager like reading Message subclasses and sending
datagrams are now in PresentsConnectionManager. PresentsServer should behave identically, except
during shutdown. Before, connections would be accepted and datagrams would be read until the OMgr
thread exited. Now, both stop as soon as the server begins its shutdown. This seems like an
improvement to me, but let me know if it causes issues and I can rework it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6270 542714f4-19e9-0310-aa3c-eee0fc999fb1
It provides code generators for streamables, services and receivers, but not DObject. It uses
Apple's CFNetwork for its sockets and builds with XCode, so it's limited to OS X and iOS. It should
be straightforward to replace both to make it cross-platform.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6264 542714f4-19e9-0310-aa3c-eee0fc999fb1
touches the _handlers Map which should only be modified on the
ConnectionManager thread. Add transferAcceptedSocket for outside socket
acceptors to call. It sticks new sockets into a queue, which are then passed
to handleAcceptedSocket as part of ConnectionManager's iterate.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6250 542714f4-19e9-0310-aa3c-eee0fc999fb1
The help message for /help <command> was using the translated/aliased string,
which meant that you had to have a usage translation for each command alias.
This became unmaintainable in Project X, where we had artists adding emotes
with lots of aliases, and I'm guessing it was booched in the Y!PP translations,
since they seem to lack translations for things like m.usage_escuchar. Let's
instead use a usage message based on the untranslated command, then compose
the actual command used into that (for aliases). This should be mostly
backwards-compatible, but I will be updating Yohoho and Bang in addition to
Project X: this involves replacing the command name in the usage translations
with {0} and returning getUsage(command) instead of "m.usage_blabla".
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6248 542714f4-19e9-0310-aa3c-eee0fc999fb1