Commit Graph

464 Commits

Author SHA1 Message Date
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 d01715a369 More style fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5242 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-19 09:50:20 +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
Ray Greenwell 8a72343130 Copy mthomas' r5236 change to the actionscript side.
How was this not a problem before? Maybe we just got lucky
on yohoho and never had an npp say something with filterable
words in the translation key.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5237 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-17 23:00:29 +00:00
Mike Thomas e114e90a05 We need to ensure our message has been translated before we try to filter it. Otherwise when a NPP says something where the key contains a word filtered in a particular language, the system doesn't find the key, and everyone gets really confused. (Was not a problem before because we normally filter using word breaks... but not all languages use such things as spaces.)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5236 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-17 18:17:27 +00:00
Michael Bayne 531f0c9ffe On second thought, let's just type our delegate operations and only apply them
to delegates that can handle them. Turns out we already even had this option in
the PlaceController.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5224 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-10 13:36:52 +00:00
Michael Bayne 950fb6c4aa Detect programmer error in delegate usage as early as possible and fail.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5223 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-10 13:19:21 +00:00
Dave Hoover ab9ca71450 A smattering more unicodification
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5220 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-03 19:45:07 +00:00
Dave Hoover fc34343f3c Make CurseFilter work on codepoints, not characters, when capitalizing the
beginning of words in those times when 2 bytes just aren't enough for a letter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5219 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-07-03 18:03:14 +00:00
Michael Bayne 2cfb546015 Nix our legacy static references as we have those in our leaf projects now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5214 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-30 14:33:06 +00:00
Michael Bayne 6a9723fb11 Extract BodyObject location into a separate service that can be customized by
extending systems and depended upon by services that need to lookup bodies.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5212 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 14:11:42 +00:00
Michael Bayne 34439e3461 Unixed import nixage, service regen, some dependency injection.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5205 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-29 12:42:06 +00:00
Jamie Doornbos 3726a408fa Fix error introduced in revision 5170
Place manager delegates now store their own references to the omgr and invmgr 
and set the members via the init function. This is fine, but due to the order
of calling PlaceManager's init and addDelegate, the PlaceManagerDelegate.init 
was receiving null values. 

The fix is to provied a more consistent guarantee about the relationship
between init and addDelegate. After both have been called (regardless of
order), we guarantee that both init and didInit have been called on all 
delegates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5177 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-10 18:24:33 +00:00
Michael Bayne c2d5b28b39 Make the PeerManager and CrowdPeerManager abstract to ensure that a failure to
bind something to PeerManager.class will result in initialization failure.

A system that uses the peer services needs to extend PeerManager or
CrowdPeerManager with a concrete PeerManager and then
bind(PeerManager.class).to(SomePeerManager.class) to properly satisfy the
dependency.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5171 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 20:55:33 +00:00
Michael Bayne 0128f6525a Modify PresentsClient and ClientResolver creation so that we can inject
dependencies into both. Moved the legacy statics into CrowdServer so that at
least Presents can be pure (we should probably eventually move them into
BangServer and PiracyServer and fix everything else). Added some useful manager
references to PlaceManager delegate (_omgr, _invmgr) that handle the majority
of their service needs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5170 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 20:23:49 +00:00
Michael Bayne bf77cb1520 Moved location services implementation into LocationManager so that
LocationProvider can be an interface like its brothers and sisters.

Modified the place registry to create PlaceManager instances using the injector
so that we can inject dependencies into managers. Also modified the custom
classloader functionality so that it can/will circumvent this process
entirely. It's not possible to inject using a custom classloader and one
certainly would not want to do so.

Unfortunately this means we can't inject some basic managers into PlaceManager
because it needs to work for games loaded into a sandboxed classloader, but the
big win is that in everything other than GameManager and PlaceManager, we can
inject to our heart's content.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5168 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 17:18:26 +00:00
Michael Bayne a7c7d853fe Handle the BodyService with a BodyManager instead of a concrete BodyProvider.
More dependency injection (or removal in the case of SpeakUtil).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5163 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 13:06:03 +00:00
Michael Bayne da11bd0ea0 Regenerated services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5161 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 12:58:27 +00:00
Michael Bayne eee2c74943 More singleton marking.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5160 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 10:29:18 +00:00
Michael Bayne a531fd2196 Inject the ChatProvider as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5159 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 10:10:41 +00:00
Michael Bayne 3404d14e7b Have the PlaceRegistry handle shutting down all places when the server shuts
down. Inject same.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5158 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-08 10:07:41 +00:00
Michael Bayne a6842ae5e1 Properly mark some singletons as such.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5156 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-07 19:14:10 +00:00
Michael Bayne fce06c52c5 Actually instead of doing the necessary jiggery pokery to make PresentsServer
subclasses provide PresentsServer "services" we'll just have no PresentsServer
services. All services will be provided by components and the server will
disappear in a puff of inversion of control.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5155 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-07 18:57:04 +00:00
Michael Bayne c568204bbb Merge the ServerInvoker stuff into PresentsInvoker because the PresentsInvoker
is only ever used by the PresentsServer. Also determined that we need to
explicitly let Guice know that CrowdServer provides the PresentsServer
"interface" and so on down the line.

I also think that each concrete class needs to be marked as @Singleton though I
need to confirm that. Based on how annotations work, that's how it would be
easiest to implement, so we'll assume they're not doing extra work on the
backend to make our life easier.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5154 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-07 18:39:19 +00:00
Michael Bayne 3aefc93838 Holy fruity beverage Batman! I'm taking the plunge and switching to Guice for
dependency resolution and management. Things are currently in a state of
transition, but the important patterns have been established and I'll aim to
sweep through all of Narya, Nenya and Vilya in the near future and do
everything properly.

Going through the other million-odd lines of code we have scattered across our
various projects that use these libraries is not something I plan to do, so
we'll be maintaining backward compatibility with the old static member method,
though I hope to strive toward eradication of that usage entirely in MSOY while
we still have a fighting chance.

Given that some of our projects will continue to use the static member method
in perpetuity, I'm not going to @Deprecate those fields because that would fill
their logs with so much spam that they'd have to turn off deprecation warnings
which would make life worse for them. So instead we'll settle for the big scary
comment warning people away from the old bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5153 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-07 17:44:48 +00:00
Michael Bayne 919112cf88 Switch to new samskivert logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5134 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-27 19:25:38 +00:00
Michael Bayne 591dc1541a Extract our permission policy into a separate class so that a system can more
easily make use of different permission policies in different circumstances
(one can imagine a hypothetical partner who has different access control
requirements, perhaps).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5118 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-22 13:12:40 +00:00
Michael Bayne 86dd4d75c7 Cleaned up the fine-grained permissions system a bit so that Yohoho can make
use of it in good conscience.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5117 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-22 12:03:30 +00:00
Michael Bayne ec3fb4023a Allow the BodyObject to play along when we enter and leave a place.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5108 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-18 11:30:45 +00:00
Ray Greenwell 2cb6086434 Look ma, it's the last word in a small Ray-Charlie quibble. :)
I just feel like: imagine if there were no Map.containsKey().
You would instead have to get() the value and see if it's not null.
If you did that, you certainly wouldn't throw away the value if you
were going to get it again right below, would you? So why would
you do it simply because of the addition of a convenient method
called containsKey()?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5067 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 21:46:43 +00:00
Michael Bayne 5d544fdd55 Use Maps and Lists. Unglommed imports. Having them separated into presents and
crowd was intentional (with presents on top because it is more "generic"). We
must resist Eclipse's desire to squish our imports together into one giant,
hard to (visually) parse blob.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 11:47:38 +00:00
Jamie Doornbos c112a5c982 Regenerated narya services with new GenServiceTask, actionscript and java
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5051 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:17:34 +00:00
Jamie Doornbos 430b23a5bb regenerated services, notice actionscript stuff has the most changes
(I just noticed marshallers are importing themselves but the flash compiler 
doesn't seem to mind, so committing now)



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:54:58 +00:00
Par Winzell 5924aac198 Running genreceiver and genservice with Jamie's spiffed-up generators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 16:59:04 +00:00
Charlie Groves 938d7f5994 Share a single MethodFinder between all instances of a subclass of PlaceManager as they can be large enough constitute the bulk of a PlaceManager
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5029 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 18:07:04 +00:00
Michael Bayne 249c4bb42d Nixed some now redundant casts.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5021 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-23 20:00:09 +00:00
Ray Greenwell dd8fcfc0a7 Allow subclasses to translate the status if a nonstandard one is in use.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4911 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-12-19 19:14:47 +00:00
Michael Bayne 5e2a70bf5c Nix marker interface that's not used by anything. If we do ever want something
like this, we can think about where the interface would be useful.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4910 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-12-18 00:19:56 +00:00
Michael Bayne c935c46612 Handle the client connecting and disconnecting before client object resolution
completed, or connecting, disconnecting and reconnceting before client object
resolution completes a little more gracefully.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4889 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-12-03 18:28:07 +00:00
Michael Bayne 95adfeb646 Regenerated services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4883 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-28 00:25:35 +00:00
Michael Bayne 63db77667a Some type safety, redundant cast removal, and other code hygiene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4879 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-24 19:40:19 +00:00
Michael Bayne 576dfa2c85 If a move fails and we're currently in a place, just stay where we are rather
than trying to go to our previous place. If we're no longer in a place (like we
switched servers to get where we're going), then we'll try to go back to our
previous place.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4875 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-15 01:59:22 +00:00
Michael Bayne b688776893 Allow createPlace() to be passed a list of delegates to be added to the place
manager prior to it being initialized or started up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4869 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-10 05:01:02 +00:00
Michael Bayne abeeef4d10 PlaceManagerDelegate no longer takes its target manager in its constructor but
rather is configured with it when added to the manager as a delegate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4868 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-10 04:41:01 +00:00
Michael Bayne d84b2ac8a0 Report a more useful error if we have a bogus controller. Tidied some other
bits up.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4861 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-11-02 23:02:36 +00:00
Dave Hoover 6719d18caa Rerun generators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4857 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-26 21:06:53 +00:00
Michael Bayne d4562ff806 Allow external parties to call applyToDelegates().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4838 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-10-02 23:29:02 +00:00
Michael Bayne 873eede988 Log a message when we drop a forced move request due to a pending move.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4831 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-24 20:47:17 +00:00
Dave Hoover 59a65e9ef2 We're waiting to hear that our PlaceObject has been destroyed so we can
call didShutdown, so we can't stop listening to it until then.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4824 542714f4-19e9-0310-aa3c-eee0fc999fb1
2007-09-13 21:38:01 +00:00