Commit Graph

158 Commits

Author SHA1 Message Date
Michael Bayne 5d2f302218 Created RootDObjectManager interface for those entities that want to look
up objects directly by oid. They, of course, must be on the server if they
are doing this.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@728 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-04 01:01:54 +00:00
Michael Bayne a308079d70 Utilities for streaming streamables.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@725 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-03 23:48:38 +00:00
Michael Bayne 16efe382bd Augmenting the AuthResponseData with server stuff turned out to be a bad
idea because that class is shared between the client and the server, so
instead we provide a blank object reference in which the authenticator can
provide whatever information it wants to the client services.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@723 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-03 22:01:57 +00:00
Michael Bayne a0ba41c31d Provide a mechanism for the authenticator to pass information to the
client object by way of passing the auth response data up to the client
after the completion of the authentication phase. This allows information
loaded by an authenticator (like a user record) to make its way into the
real world.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@722 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-03 20:14:51 +00:00
Michael Bayne f506a686f9 Added unregisterReceiver().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@650 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-27 21:37:58 +00:00
Michael Bayne cc21ad8679 Javadoc fixes and cleanups.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@623 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-18 04:27:56 +00:00
Michael Bayne ff94bd7799 Made it possible to disable client and connection managers for testing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@609 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-08 05:39:51 +00:00
Michael Bayne d584566899 Removed bogus imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@606 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-08 02:59:30 +00:00
Michael Bayne 304e7bd4b4 Whoops. Missing an import.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@572 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-25 23:37:13 +00:00
Michael Bayne cd458fa3aa Moved the default server port into the client where it is accessible by
various entities rather than only server code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@571 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-25 23:36:06 +00:00
Michael Bayne 57b2e93ac3 Modified DObjectManager.createObject() to not afford optional subscription
because subscription no longer means receiving events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@537 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-24 00:36:40 +00:00
Michael Bayne 660fccceb4 Don't log when we're woken up to read data but there's none available.
We'll debug that probable Linux JVM bug later.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@536 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-24 00:35:37 +00:00
Michael Bayne 15ff048a27 Created mechanism for listeners to hear about object death.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@535 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 23:56:12 +00:00
Michael Bayne 690940db47 ElementUpdatedEvent wasn't registered.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-23 20:22:47 +00:00
Michael Bayne 85fec1b758 Coerce null strings into empty strings when marshalling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-19 18:03:28 +00:00
Michael Bayne 33b76cd711 Added standard error code for internal server errors.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@504 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-19 18:03:06 +00:00
Michael Bayne c14b396edf Need to remove ourselves from the listener list as well as the subscriber
list now that we do both.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@492 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-18 18:41:29 +00:00
Michael Bayne 8dcdfb7e8a Added loggedOn() which indicates whether or not we're logged on and
modified code not to try to logoff in logoff() unless we're actually
logged on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@491 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-18 18:40:18 +00:00
Michael Bayne 26b7f1c6bb Fixed bug with header length decoding.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@487 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-18 01:42:42 +00:00
Michael Bayne cd39295574 Added field marshaller for int arrays.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@470 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 02:56:51 +00:00
Michael Bayne f863620d39 Added a field marshaller for string array fields.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@466 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-17 02:48:11 +00:00
Michael Bayne afc7b6cfbb Turned ObjectStreamException into a nested exception so that we can
provide information on what exception caused the object serialization or
unserialization to freak out.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@464 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-16 16:44:20 +00:00
Michael Bayne dec8be5d57 Added size(), fixed two bugs in internal array expansion: one was that it
was doubling the size of the internal array every time add() was called,
whether it needed to or not, the other was that unserializing an empty set
caused expand() to be called with -1 as the index from which mayhem would
ensue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@463 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-16 16:43:20 +00:00
Michael Bayne 3df5a5d1cb Commented out debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@462 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-16 16:41:14 +00:00
Michael Bayne eb3bc62083 Log a stack trace if we catch an error invoking an invocation response
handler.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@459 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 20:26:00 +00:00
Michael Bayne 0ab1638611 When setting aggregate values (arrays, DSet objects), we need to clone
them before setting their value in the distributed object to prevent
subsequent events from modifying those aggregate values before the
originals were propagated to the clients by the networking thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@458 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 20:12:48 +00:00
Michael Bayne e8f5f9b904 We want Streamable.class.isAssignableFrom(clazz) rather than the other way
around. I always mess that up because it's backwards from instanceof.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@457 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 20:11:53 +00:00
Michael Bayne 0b44521984 Implement clone().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@456 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 20:11:00 +00:00
Michael Bayne 087fdd489c Added code to handle Streamable implementing DObject fields.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@452 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 19:28:43 +00:00
Michael Bayne 0994b27240 Forgot to implement MessageHandler.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@443 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:29:51 +00:00
Michael Bayne 8521994204 DSet needs to implement Streamable so that we can pass it around as a
distributed value.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@442 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:29:34 +00:00
Michael Bayne 2ffe47e282 Do the right thing with a null _listeners array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@441 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:29:06 +00:00
Michael Bayne 5ae6875bbb Added a note about listener registration management.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@440 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:05:31 +00:00
Michael Bayne 804505890f We love to revamp! Created a set of listener interfaces which are used
with distributed objects rather than having a single handleEvent() by
which all subscribers are forced to hear about all events. Now one
subscribes separately and then adds onesself as any of a few types of
listener once they have access to the subscribed object reference.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@439 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-12 00:03:03 +00:00
Michael Bayne 8a4c46badc The first great Three Rings renaming. Cocktail changed to Narya, Cher
changed to Presents and Party changed to Crowd. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@431 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-11 04:07:54 +00:00
Michael Bayne 696065f104 Report failures in iterate() but don't let the thread die.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@416 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-09 18:27:25 +00:00
Michael Bayne 747f8b50fb Use the proper toString() method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@413 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-09 18:17:52 +00:00
Michael Bayne e75e442f0c Make the bootstrap data available to external entities.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@412 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-09 18:17:33 +00:00
Michael Bayne b48e5b90a6 Created a list class that can be used to send around an ordered collection
of streamable objects. (They are manipulated all as one unit. For fine
grained distributed set management, use a DSet.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-04 23:02:07 +00:00
Michael Bayne 20b6650dad Deal with a null arguments array being provided to invoke().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@393 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-04 20:02:13 +00:00
Michael Bayne 95f6bf7300 Modified client so that the invocation director is always around rather
than being created after we log on because other code will want to
register itself with the invocation director before we log on. The
invocation director now just handles being reinitialized which is what
will happen when we log off and back on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-03 03:42:31 +00:00
Michael Bayne 09859cd1b9 Need to call super in toString().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-03 03:41:04 +00:00
Michael Bayne 14b8654d3a Modified code that calls objectAvailable() to catch exceptions thrown by
the subscriber so that they don't throw monkey wrenches into anyone's
business.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-03 03:40:44 +00:00
Michael Bayne ceca4b549a Modified Reader and Writer not to die if they have a problem reading or
writing a message.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-03 03:39:39 +00:00
Michael Bayne 3c3fd1abf4 Added ability to marshall Streamable instances.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@380 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-10-03 03:38:55 +00:00
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