Commit Graph

113 Commits

Author SHA1 Message Date
Michael Bayne 76dfd550aa Modified to use MethodFinder (now provided by samskivert library) which
resolves methods based on the types of the arguments fully properly,
rather than in the half-baked way I was doing it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-03 03:38:21 +00:00
Michael Bayne 6620936a04 We've always been at war with Eurasia. Changed InvocationManager to
InvocationDirector (please god let the renaming be done). Removed IntMap
and modified code to use samskivert's HashIntMap.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-02 02:08:16 +00:00
Michael Bayne f54628c2ba Added a ServiceFailedException for use by invocation services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-01 23:06:23 +00:00
Michael Bayne 027bb29769 Created fooCodes interfaces to go along with invocation service
packages. These contain all the message codes as well as error response
codes that are used by a particular invocation service.

Also changed client.LocationManager to client.LocationDirector and
chat.ChatManager to chat.ChatDirector to go along with the new philosophy
of naming the client-side managing entity for an invocation service a
director.

Also elimitated cocktail.util.Codes since it's no longer used as a central
repository for codes (instead they are in InvocationCodes and its
derivatives).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@368 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-01 22:14:55 +00:00
Michael Bayne f4cc436137 Allow the throwing of Exception rather than IOException during the server
init process.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-28 22:32:28 +00:00
Michael Bayne ec1cf5c667 Changed IntMap to HashIntMap.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-17 05:18:21 +00:00
Michael Bayne 2fc86f89b3 Documentation edit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@336 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-09-13 19:08:30 +00:00
Michael Bayne 0a1e364e03 Created adapters for the ClientObserver and LocationObserver interfaces to
make handling just one or two of the callbacks for those interfaces
simpler.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@305 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-22 00:08:12 +00:00
Michael Bayne 2de7726c4e Removed unneeded import.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@303 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 23:26:21 +00:00
Michael Bayne c8e6606056 Need to reset our byte array output stream when we're done with it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 21:16:53 +00:00
Michael Bayne 70eb9480d8 Made element iteration work properly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@291 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 19:35:56 +00:00
Michael Bayne a065652ac6 Unbooched subscriber array handling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 19:35:02 +00:00
Michael Bayne 9ce3d894bd readExternal() should have been called readFrom().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@289 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 19:33:38 +00:00
Michael Bayne 67a3dabac2 Have the invocation manager pass the client object back to the client when
it is ready. Then the client hangs on to it because the invocation manager
doesn't really need to hang on to the client object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@288 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 19:33:06 +00:00
Michael Bayne dac504c7bb Provide support for iterating over a DSet.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 00:58:26 +00:00
Michael Bayne abb831bca8 Provide access to the client object instance.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@282 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-21 00:58:10 +00:00
Michael Bayne b7b78e9f79 Wired up marshalling for DSet objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@277 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-20 21:44:10 +00:00
Michael Bayne eac3e9aa94 Edits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@268 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 04:22:50 +00:00
Michael Bayne 890bad996e Added ability to update elements in a set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@266 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:45:43 +00:00
Michael Bayne 2179599bd6 Edits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@265 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:33:11 +00:00
Michael Bayne 55c4847a17 Added support for distributed sets: unordered collections of elements
where the elements are user defined objects that know how to read and
write themselves on a stream. Sets are required to contain elements all of
the same type to make network traffic more efficient (avoid sending the
classname every time an element is added or removed).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:31:09 +00:00
Michael Bayne 3aa5302b00 Moved the stream related methods into a separate streamable interface that
can be implemented by objects that are streamable but that don't have an
associated type code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@263 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-16 03:25:14 +00:00
Michael Bayne 3c413b9f3d Added documentation; modified internal array management to use ListUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@258 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-15 18:38:54 +00:00
Michael Bayne 1ba8fed46b Whoops. Need to create our queue before we use it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@239 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-14 06:48:31 +00:00
Michael Bayne 744a5f395d Created a utility function for easily looking up methods.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@238 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-14 06:48:08 +00:00
Michael Bayne e9909aa34f Log a stack trace when an invocation handler fails.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@237 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-14 06:47:38 +00:00
Michael Bayne 64691eda21 Look up invocation service methods using the full signature (arguments and
all) and no longer cache the lookups because creating the cache key would
be as expensive as reflecting the method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@236 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-14 06:47:15 +00:00
Michael Bayne f17562945f Check to be sure that the client is still around before we send the
invocation response. (Better to catch it and report it here than have the
dobjmgr complain when it tries to dispatch an event on a non-existent
object.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@224 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 02:02:24 +00:00
Michael Bayne 23821aeff6 Created a class that makes it easy to run stuff off of the dobjmgr thread
and then deal with the results of it back on the dobjmgr thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@223 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 01:20:38 +00:00
Michael Bayne 7ad883b4f6 Added the ability to post runnable units of executable code onto the
distributed object manager thread. These are slipped into the normal event
processing loop.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@222 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 01:00:26 +00:00
Michael Bayne c0334d178d Comment fiddling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@218 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 00:12:11 +00:00
Michael Bayne 8a67066c57 Do the right thing if subscribers remove themselves after we've been
destroyed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@217 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 00:11:53 +00:00
Michael Bayne a44e552eb8 Modified invocation services such that providers are responsible for
delivering their own responses. They now have all the information
necessary to do so which means that they can delay the delivery of a
response until some other asynchronous event has taken place (like a
database load completing). Prior to this, they were required to complete
their service immediately and return the response back to the invocation
manager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@216 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-11 00:05:58 +00:00
Michael Bayne a668f65991 Fixed javadoc @see.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@203 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-09 00:59:53 +00:00
Michael Bayne b2d0ddee27 The conmgr now gets its listening port number from the config file.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@201 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-08 23:56:20 +00:00
Michael Bayne aa9799e8c6 Use inherited properties when we bind 'em.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@200 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-08 23:48:51 +00:00
Michael Bayne 5dfb32d739 Modified event helper mechanism to allow helpers to abort the event
dispatch. Added code to abort object added events that are trying to add a
non-existent object to an oid list. Wrote test driver for this and
duplicate object add request handling.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@196 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-08 21:56:48 +00:00
Michael Bayne 6fe9ad8a6e Finished wiring up oid list tracking; made shutdown() work on the cher
server; added an easy mechanism to write test modules and invoke them on
the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@192 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-08 00:28:49 +00:00
Michael Bayne 5320567957 Commented out some debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@190 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-07 21:25:13 +00:00
Michael Bayne 71de825456 Finished up session termination processing; added code to track
subscriptions and clear them out when the client disconnects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@189 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-07 21:20:48 +00:00
Michael Bayne 782e9501d6 Implemented object destruction; wired up some missing stuff; created a
test server to make some testing easier; various other cleanups.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@188 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-07 20:38:58 +00:00
Michael Bayne 17135945d1 Had to modify the way control is transferred to the dobjmgr thread during
session resumption because the client is not subscribed to the client
object at that time. This way is cleaner anyway.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@185 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 03:26:00 +00:00
Michael Bayne db9f2283f3 Modified the client side of the invocation services to communicate the
invocation request id to the invocation requester and then also to pass it
along when delivering the invocation response.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@180 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 02:54:01 +00:00
Michael Bayne 7f82de4146 Changed InvocationReceiver into an interface because it needn't be a class
and that allows classes that normally do other things to register
themselves as an invocation receiver.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@179 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 02:31:20 +00:00
Michael Bayne 7688865b96 Modified client internals to ensure that sessionWillStart(),
sessionWillResume() and sendBootstrapData() are all consistently called on
the dobjmgr thread because that is the most useful. Added
sessionDidTerminate() but session termination is not implemented yet.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@177 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 01:54:34 +00:00
Michael Bayne c1dd28330f Register the ReleaseLockEvent.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@174 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 01:05:25 +00:00
Michael Bayne b164f2abc6 No need to tell subscribers about lock release.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@173 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 01:05:12 +00:00
Michael Bayne 8d5beffad7 Fixed a bug with removing oids.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@172 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 01:04:49 +00:00
Michael Bayne 7873ee98f7 Added facilities for creating named locks on distributed objects that will
allow services to prevent repeated invocations of themselves from stepping
on one another because of the serial nature of event processing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@171 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 00:39:44 +00:00
Michael Bayne a831089362 Revamped toString() to be more derived class friendly. Added a
ReleaseLockEvent which will be used by the distributed object locking
facilities.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@169 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-08-04 00:32:11 +00:00