Commit Graph

4317 Commits

Author SHA1 Message Date
Jamie Doornbos 69451c5682 Implemented bureau authentication
* Token member for bureaus
* Exception type for failed authentication
* Authenticate function
* Bureau id to credentials
* Fixed bad constructor and toString


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5149 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-06-02 04:38:01 +00:00
Jamie Doornbos 214d464c7f Fixed the token and added a TODO since ProcessBuilder on unix cannot handle empty strings
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5147 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-30 18:06:07 +00:00
Michael Bayne 02b2c67991 Name the connection manager thread.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5146 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-30 12:20:58 +00:00
Michael Bayne 64f418fca9 Looks like Dave already fixed Yohoho, so we're in the clear.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5141 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-28 22:27:25 +00:00
Michael Bayne 8e7e9b1278 Work with both for now until I migrate Yohoho.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5140 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-28 22:22:58 +00:00
Michael Bayne c915f24010 Switched to the new logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5139 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-28 22:21:04 +00:00
Mike Thomas 83693608d8 Disarm the stack overflow boobytrap.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5138 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-28 02:15:36 +00:00
Jamie Doornbos c8763c245a Added serverClass field to bureau agent objects. Also renamed redundant "agentCode" to just "code"
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5136 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-27 22:33:15 +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
Dave Hoover 9abef6df53 Lots of times we don't care WHY someone lacks access, just that they do; so
add convenience wrappers giving us a boolean back instead of forcing us to see
if checkAccess(blah) == null.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5132 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-23 23:26:12 +00:00
Andrzej Kapolka ac3640dc9d Standalone clients don't have communicators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5129 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-23 21:00:08 +00:00
Jamie Doornbos 35955cc701 Fixed another couple of bugs in service generation discovered when generating services for vilya
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5122 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-23 00:40:56 +00:00
Michael Bayne da9d8701c2 Sometimes my mind drifts away and forgets that I live in a world where I have
to write everything in two languages, and now have to take special care that
things written in one of those languages works properly in a wholly separate
and somewhat limited deployment environment. Ah such sweet forgetting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5119 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-22 14:12:10 +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
Andrzej Kapolka efb1a7c89a Use the overloaded default methods for default transport.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5115 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-22 00:36:20 +00:00
Michael Bayne 9e8f5f0b08 Nixed stray blank line.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5111 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-21 11:26:18 +00:00
Michael Bayne 9b9d62558d More unit cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5109 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-18 11:39:20 +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
Michael Bayne 9b92f14412 Improve error message.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5107 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-18 11:30:16 +00:00
Andrzej Kapolka 117fb1a67b The problem was elsewhere, so revert the last couple of changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5106 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-18 06:59:16 +00:00
Andrzej Kapolka 7a1ec4a3a1 Let's see if it helps to have the enum outside the class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5105 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-17 01:52:32 +00:00
Andrzej Kapolka 814ad6b1d7 Third time's a charm: apparently values() is problematic, so
let's try using a normal HashMap.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5104 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-16 22:16:50 +00:00
Andrzej Kapolka 817c7014b4 Apparently EnumMap doesn't work with Retroweaver, so let's try
using an array instead.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5103 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-16 21:25:22 +00:00
Mike Thomas 943e18ac4a genreceiver also needs to deal with arrays as parameters for import purposes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5101 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-16 17:05:02 +00:00
Andrzej Kapolka db874782f9 Allow inheriting the transport hint from the containing class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5100 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-16 02:41:40 +00:00
Andrzej Kapolka ee74481cad Much work on generalizing the notion of message "transport" and
allowing the use of annotations to customize transport for 
DObject fields and service/receiver methods.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-16 01:47:33 +00:00
Andrzej Kapolka 9bafa5e7c8 Basic support for datagram messaging. Hope I haven't fucked
anything up!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5090 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-13 21:12:39 +00:00
Jamie Doornbos 2a49924f91 Bureaucracy: consistently log info message for all agent and bureau entry points
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5082 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-12 23:23:31 +00:00
Charlie Groves 8581947de5 Add a cousin of setUsername, updateUsername, that does the same thing but in the active client object. Like setUsername, its invocation should always be accompanied by the sacrifice of at least three chickens and if you really want it to succeed, one small goat.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5081 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-12 21:23:16 +00:00
Jamie Doornbos 7bbd9baf28 Fixed bug where bureau registry would not destroy pending agents, exposed by curretnly broken thane client
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5075 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-10 00:58:00 +00:00
Mike Thomas c42281ce7a Patch from Jamie to ensure GenService still finds all the array parameters for importing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5069 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-09 23:06:43 +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 bc35598a2e first pass at converting the bureau client to actionscript. now to find a way to run it...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5054 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 23:01:46 +00:00
Jamie Doornbos 8eef2df364 Fixed same package removal to not also wipe out subpackages
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5052 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:30:55 +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 6ee4f8115f When generating service-related code, remove imports of classes in the same package
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:16:06 +00:00
Jamie Doornbos 147e849cbb adding missing license header
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5049 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:07:30 +00:00
Jamie Doornbos 98bb871e6d Fixed code generation for existing msoy services
* Created concept of a pattern for transforming imports rather than have some
  methods assume a suffix is provided and others assume a prefix
* Leave full array types in import set initially so that they can be dealt with 
  differently by different code exporters
* Added more primitive types and array types for action script marshallers, 
  including conversion to TypedArray
* Add listener marshaller mungings for action script marshallers' imports
* Added handling for array imports for action script services


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5048 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:06:32 +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
Jamie Doornbos 2ecda5b89a Forgot to check the receivers, needed to do the standard removeGlobals call
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5042 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:48:36 +00:00
Jamie Doornbos 61b1f23303 Narya.abc work - refactored GenServiceTask import mechanism in order to generate
clean action script files with no unnecessary imports
* New class ImportSet to facilitate the operations being performed manually
  throughout the code. Also removes the need for rawimports
* Threaded ImportSet through all places where imports and rawimports were used
  and removed magic parameters to control import generation
* Added an ImportSet instance to ServiceListener, this was key to the action 
  script fixes
* Moved all the import tweaking and munging logic into the generate* methods
  and made specific to code being generated (removed overreaching stuff
  from ServiceMethod, this was part of the problem)
* Removed blanket imports from tmpl files
* Removed unused methods
* Fixed tabs from last commit
* Quick and dirty script to check for unused imports


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:44:36 +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
Jamie Doornbos bf501313f1 Narya.abc work - get rid of unused imports in generated service targets:
* ServiceMethod import options:
  - Made argument type imports ignore first N args (0 for old behavior)
  - Made marshaller listener imports optional
* Added InvocationTask._verbose and several dumps of current imports to help 
  track down future superfluous imports
* Made the import of ServiceListener method arguments' types optional
* Wrapped up most of processService code into protected inner class 
  ServiceDescription and made configurable:
  - Optional import of the types of the first arguments of the service methods
  - Optinoal import of the types of listener method arguments
* Changed generate methods to take the service class and construct their own
  local ServiceDescription configured for their target
* Removed global import of service class and do it explicitly where required
  (via method addServiceImport)
* Made some imports conditional
  - InvocationResponseEvent for mashallers only if service has some listeners
  - InvocationException for providers only if service has some methods with 
    listener arguments
* Removed unused variables and imports


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-05 22:53:31 +00:00
Jamie Doornbos 3d65f679e8 Fixed I/O in BureauRegistry and removed synchronization
* Keep an Invoker member
* Added internal Launcher class to run ProcessBuilder.start on the invoker 
  thread because it is blocking
* Removed synchronized from methods, all ooo-servers are single threaded, 
  hurray!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5033 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-30 18:27:45 +00:00
Jamie Doornbos e74035a05c Bureaucracy smoke test and resulting bug fixes
* Added RegistryTester smoke test which randomly creates and destroys agents 
  in batches
* Fixed bug where correct agent id was never making it to client
* Implemented Bureau.toString (+refactored summarize method)
* Fixed nasty bug due to my assumption that SafeSubscriber =~ Subscriber, they 
  are in fact completely different


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-30 17:55:40 +00:00
Jamie Doornbos 490b5b9764 Bureaucracy: Fixed my TODO about using google's Maps and Sets utils
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 19:02:13 +00:00
Jamie Doornbos f41233c5ac Bureaucracy review updates and hello world test
* Fleshed out client-side Agent class, made abstract
* Delegate the creation of the bureau director to subclasses of BureauClient
* Moved BureauDirector's BureauReceiver and Subscriber implementations to 
  anonymous classes that delegate to protected methods.
* Use SafeSubscriber
* Added new service method for notiyfing the server when the creation of an
  agent fails so that the registry is not perpetually waiting
* Made BureauCredentials more conformant
* Made BureauRegistry respond properly to client logging off
* Got rid of superfluous uses of safeToString
* Changed Launcher to CommandGenerator and now use ProcessBuilder and 
  copyMergedOutput
* Changed bureau process parameters to server name and port instead of URL


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5030 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 18:34:51 +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