Commit Graph

  • c88ca10d26 Provide a means of adjusting the select loop time. Andrzej Kapolka 2009-11-06 22:00:30 +00:00
  • 00c4777460 Example text. Ray Greenwell 2009-11-06 21:50:21 +00:00
  • d82a926ca1 Add an example to the docs. Ray Greenwell 2009-11-06 21:18:43 +00:00
  • a707c8b515 Set the traffic class for datagrams to low-delay. I doubt this will actually reduce latency, but wouldn't it be cool if it did? Andrzej Kapolka 2009-11-06 20:56:37 +00:00
  • ee27342a24 Proposed change to readObject(). Ray Greenwell 2009-11-06 01:27:03 +00:00
  • c16de5994e Moved these here to narya. Lately I'm trying to do things more "actionscripty", and so we just use the "natural" iteration on an object (either 'for' or 'for each'). Plus, we never use these Iterators anywhere except in presents-based code. Ray Greenwell 2009-10-27 00:57:48 +00:00
  • 6137fbfb79 As Charlie points out, we can use the protected constructor if we're creating an anonymous extension of DefaultMap and any other creation is better done through the static factory methods, so don't present the user with a pointless choice. Michael Bayne 2009-10-23 04:58:49 +00:00
  • b124934a97 MethodQueue -> DelayUtil. Ray Greenwell 2009-10-21 21:49:17 +00:00
  • 90c97a54b3 Turns out USR1 is reserved by the JVM on pretty much every platform but Mac, so only expose USR2 for injected handling by subclasses. Charlie Groves 2009-10-21 20:47:55 +00:00
  • 9284f1b4b6 Expose USR1 and USR2 signals to users of AbstractSignalHandler if they bind instances of a SignalReceiver class for those signals. Charlie Groves 2009-10-19 20:58:03 +00:00
  • 644de92f7b toString() is being overridden, mark as such. Mike Thomas 2009-10-08 20:28:09 +00:00
  • ecec43418b Fluency--. Michael Bayne 2009-10-04 23:26:09 +00:00
  • 5f3f1ad5c9 As Ray points out, we don't need a special interface for this. The creator is simply a function from K to V. Sorry to break users but I know you're few and being able to integrate with all the excellent Google Collections functional stuff is a juicy reward for a little egg breaking. Michael Bayne 2009-10-01 01:07:28 +00:00
  • dd15495810 Avoid NPE for final datagrams sent/received after client cleanup. Andrzej Kapolka 2009-09-28 21:51:08 +00:00
  • 8cbc3fcf1a Throttle datagrams as well as streamed messages. Andrzej Kapolka 2009-09-27 02:23:17 +00:00
  • 2d044ec3f5 Fix the docs now that fetch has shown up and break out a factory for instance Creators separate from newInstanceMap. Charlie Groves 2009-09-26 00:35:13 +00:00
  • c42cb490cf Every "case" should have a "break", even the last one. Ray Greenwell 2009-09-24 21:17:15 +00:00
  • ea49d70129 * Add Msoy's MethodProfiler so I can use it in Riposte. * Apparently, a couple of whitespace cleanups my gvim did awhile ago while I was looking around in here. Nathan Curtis 2009-09-24 20:40:48 +00:00
  • 1c538ac78e Drive-by logging modernization. Ray Greenwell 2009-09-24 20:18:14 +00:00
  • dae0f7f44f Fuckit, let's use uint paramters and make the default uint.MAX_VALUE. Unless I have to roll this back because the like compiler in CS3 shits its pants trying to understand it (external references for default parameter values seem to sometimes fail). Ray Greenwell 2009-09-24 20:13:39 +00:00
  • 3f2468e7a1 Oh crap, let's make ObjectOutputStream protect against fuckup, too. Note that we're using ints instead of units for offset/length. Does anyone really need a byte array larger than 2^31? And if so, wouldn't you then also be within sight of busting 2^32? Why not make it a Number and support up to 2^53? Number is no guarantee of a desire for a floating-point value in the flash libraries, see Graphics.lineStyle()'s first parameter. Actionscript, you fail for not having long. And... I said I wasn't going to bitch at Adobe/Macromedia any more but this is a total FAIL. 0 is a valid length. Everyone knows this. Can you imagine if they picked a different constant? length: the number of bytes to read, unless it's 9, in which case it reads *all* the bytes. Your code should check to see if you're about to read 9 bytes, and instead read 8 in one go and then a follow-on byte. uint.MAX_VALUE would have made tons more sense. Ray Greenwell 2009-09-24 20:09:35 +00:00
  • 33d19f7a69 Another fix for potential streaming errors. Ray Greenwell 2009-09-24 19:37:34 +00:00
  • 730d448e40 As far as I can figure, ArrayMask objects are used even when the Array length is 0, so let's make sure we don't cause any streaming errors here. Ray Greenwell 2009-09-24 19:35:35 +00:00
  • a6a008cb50 Turns out we want to highlight the difference between normal getting and getting that adds the default value to the map. I opted for fetch() which at least means something close to get() and can be documented as also inserting the default value. I also considered obtain() and acquire() but those both felt like they had something to do with locks. apply() seemed too functional. wangle() seemed like a strong contender for a while. Michael Bayne 2009-09-22 20:25:05 +00:00
  • 3c159a6497 Widened Charlie Groves 2009-09-22 00:05:18 +00:00
  • f75d46f75f Add a better toString, for debugging. Ray Greenwell 2009-09-17 23:16:22 +00:00
  • 53f1dff95d These are all final. Ray Greenwell 2009-09-17 21:58:30 +00:00
  • f9bc385c99 Some examples. Ray Greenwell 2009-09-17 21:53:02 +00:00
  • a24b0d2d03 So, these classes like Integer and langBoolean exist solely for streaming to our java server, so let's just make them streamable directly. Does away with the need for custom Streamers. Also made them Hashable, in case we read a StreamableHashMap containing Integers as keys, for example. Less code is better code. (Why was BooleanStreamer added the other day? langBoolean was already Streamable and was already in Translations) Ray Greenwell 2009-09-17 21:42:25 +00:00
  • 055aac9b55 Use Joiner instead of StringBuilder, in some places. Use String concatination in others (it's faster in actionscript than in Java) Ray Greenwell 2009-09-16 21:13:07 +00:00
  • 9f967dd575 This is already output by SimpleStreamableObject... Ray Greenwell 2009-09-16 20:03:53 +00:00
  • e0a4340947 add missing BooleanStreamer Tom Conkling 2009-09-15 21:53:26 +00:00
  • 293ec52255 Some Galileo inspired raw type and dead code elimination. Michael Bayne 2009-09-14 22:20:16 +00:00
  • 26d982ae54 Document those so eclipse with strict docbook warnings doesn't get cranky that they're never used. Dave Hoover 2009-09-14 22:18:31 +00:00
  • 66af5d397b There's no especial need to disallow use of the constructor. Michael Bayne 2009-09-12 01:17:49 +00:00
  • bba467be39 Slight description editing. Michael Bayne 2009-09-12 01:15:53 +00:00
  • 9b946dfbd5 DefaultMap extracted from Yohoho, simpl- and and MDB-ified. For Charlie's inspection and approval and Matt's eventual use. Michael Bayne 2009-09-12 01:13:19 +00:00
  • 32db838be2 Hmm don't throw the ArgumentError inside our own catch, even though we should have re-thrown it. Ray Greenwell 2009-09-11 16:49:37 +00:00
  • 4fe12a043d Even when fed an object graph with no loops we could have a stack overflow in our recursive checking. Try to catch it and cope. I have a bad feeling this won't actually work in some envs. Ray Greenwell 2009-09-11 15:30:43 +00:00
  • f4ab06b619 Integers and Booleans are final. This fixes the Integer[] streaming problem I was having with Bite Me. Tom Conkling 2009-09-11 02:13:03 +00:00
  • 00569e651f Added a system for tracking the messages sent to and received from the server for the purpose of statistics tracking. Andrzej Kapolka 2009-09-11 00:19:10 +00:00
  • 05e37f4f42 This log message is not strictly necessary. The connection manager immediately logs that it's listening on its configured ports, when start() is called. It does so on a separate thread, but I don't believe the subtle ordering possibilities there are something that's actually causing/likely to cause problems and/or needs to be called out. Michael Bayne 2009-09-10 19:42:18 +00:00
  • 179c66f46a Missed a spot. Michael Bayne 2009-09-10 19:39:03 +00:00
  • 03ff9f8220 PresentsDObjectMgr.isRunning() is really isNotShutdown() and we need to preserve those semantics. Sigh. Michael Bayne 2009-09-10 19:38:36 +00:00
  • f92350f1b3 Bah, don't include the PresentsDObjectMgr's state when trying to assert our invariants. Michael Bayne 2009-09-10 19:36:33 +00:00
  • a8d3227fb5 You too. Naughty misreporter. Michael Bayne 2009-09-10 19:32:06 +00:00
  • 1c60b9cc75 Promote the datagramHostname to the bindHostname and use it for our TCP connections as well. Michael Bayne 2009-09-10 18:34:42 +00:00
  • 701d885222 Keep track of the total number of units run independently of Stats so it is not reset every 3 minutes by pulse. Jamie Doornbos 2009-09-09 23:59:02 +00:00
  • 6f7c9831d8 Comment tweak. Par Winzell 2009-09-09 14:50:30 +00:00
  • f3fd4d28a5 We need to use the thread context classloader if one has not been specified. Michael Bayne 2009-09-07 20:39:32 +00:00
  • 2acedb91a4 Better protection against divide-by-zero - if we have less than a second, we'll just round up to 1 second. Mike Thomas 2009-09-04 22:42:27 +00:00
  • 3aec11f519 This is cloggin' the bureau loggin'. I'm pretty sure it's the BaseGameConfig. Typically, clients don't add directly to a StreamableHashMap received from the server, why would they? So let's just treat it as a String-key map and shut it up. Ray Greenwell 2009-08-30 20:40:37 +00:00
  • bf5d3c666f Avast, thar be bugs here too. Ray Greenwell 2009-08-30 00:37:08 +00:00
  • e27f0ed5e2 No more setHours Charlie Groves 2009-08-26 22:51:48 +00:00
  • 90e11d00b7 More fluency, less effluent Charlie Groves 2009-08-25 23:14:59 +00:00
  • 7a95df0c26 Added import for javadoc. Michael Bayne 2009-08-25 22:57:34 +00:00
  • 2b5b0389e0 These classes moved from flash-utils back into narya. Not generally useful to your everyday flash coder. MessageBundle and MessageManager are built on top of Flex Resources, and were already being excluded from our asdocs, and TimeUtil uses MessageBundle. Ray Greenwell 2009-08-25 19:42:47 +00:00
  • da0e42a2b4 Inline references to other classes? That is not the actionscript way. Ray Greenwell 2009-08-25 19:24:21 +00:00
  • 5e0eb1d970 Fix the asdocs here. But wait, why is this even showing up in the SDK docs? Ray Greenwell 2009-08-25 18:56:18 +00:00
  • 1083490e73 Use newMapOf(). Ray Greenwell 2009-08-24 21:36:19 +00:00
  • f8d5e679fd We use StreamableHashMap sensible and only store one kind of key. Let's guess the type based on the first key unserialized, and guess if it was empty. Ray Greenwell 2009-08-24 05:22:05 +00:00
  • c9ea3709f7 Use new Maps factory. The old HashMap class was a frankenstein one-size-fits-all mess of: - storing simple objects - storing Hashables - having the capability to provide external functions to hash and check equality of any other type of key. Ray Greenwell 2009-08-24 02:54:23 +00:00
  • e6fa8e77f1 Obsolete. Ray Greenwell 2009-08-22 00:12:51 +00:00
  • 6aa154575e Look ma, just lib. Ray Greenwell 2009-08-21 23:30:11 +00:00
  • 24c16141f6 I do not think we need this anymore. Ray Greenwell 2009-08-21 22:54:12 +00:00
  • b5de96dc83 It's an ecological disaster! I'm trashing the Environment! No more *-env libs. Ray Greenwell 2009-08-21 22:46:50 +00:00
  • 44480ada4a Use ClassUtil.isAssignableAs(). It works in thane now. Ray Greenwell 2009-08-21 22:45:36 +00:00
  • 655b70b0e2 Don't include the ooolib classes in our lib, right? Ray Greenwell 2009-08-21 21:30:35 +00:00
  • 4848fe4b29 Now that ByteEnum has been liberated from depot, lets support streaming them as bytes. It's better than writing a modified UTF String, but it'd be even nicer if we could avoid the short to read the class name (Enums are final), but I suppose we still have to know whether one is null or not. Hm. Ray Greenwell 2009-08-19 02:18:14 +00:00
  • cc5a87d18d isEmpty() -> getPendingUnits() == 0. Michael Bayne 2009-08-18 23:39:34 +00:00
  • 00416168bb Nix some warnings. One shouldn't be coped with, and so let's let it NPE. The other happens now in normal circumstances in msoy, and I'd rather not surround the call to super with an if to avoid this warning, and potentially kablooie in the future if other functionality is added to leftLocation in this base class... Ray Greenwell 2009-08-18 21:34:51 +00:00
  • b04e27f8fa Prune spurious semicolons Dave Hoover 2009-08-17 21:45:13 +00:00
  • a3b20e176b Scratched an itch... Removed the unholy 'alreadyDisplayed' hack and associated return value from ChatDisplay. The localtype should be used to determine whether something should be displayed. If not, why should ChatDisplay registration order matter? It shouldn't. If there are two ChatDisplays that could potentially show the same message and you only want one of them to, sort that out in your own fuckin' code. I'm not changing the Java side right now because I'd have to patch-up a bunch of projects... Ray Greenwell 2009-08-15 00:06:12 +00:00
  • 1b17350ee0 Allow command handlers to be unregistered. Ray Greenwell 2009-08-14 23:45:47 +00:00
  • 6e69b98459 Tweaky tweaky. Michael Bayne 2009-08-14 22:29:02 +00:00
  • 4a734d00ef Drive-by logging varargification. Don't ask what I'm doing driving in this neighborhood. Ray Greenwell 2009-08-14 22:12:56 +00:00
  • ee4369df0f Freak out not if we have no client reference. Michael Bayne 2009-08-14 21:36:13 +00:00
  • 04316d8620 My actionscript-fu has improved since I originally wrote this. Ray Greenwell 2009-08-14 03:10:48 +00:00
  • 49f5d7fed8 We don't read creds on the client. Ray Greenwell 2009-08-13 23:34:12 +00:00
  • e469bb4abc I'm pretty sure we never read Credentials on the client... Ray Greenwell 2009-08-13 23:32:30 +00:00
  • 7489a64555 Every byte is precious! No need to tell the server the callerOid, it already knows it. This saves 4 bytes for every listener you pass into an invocation request. Ray Greenwell 2009-08-13 19:15:21 +00:00
  • 8284198e57 Don't do it twice. Yes, I'm embracing making things more "actionscripty", including some implicit coercian to a Boolean, which can actually be quite dangerous... but only with Strings and Numbers and whatnot. Ray Greenwell 2009-08-13 06:23:27 +00:00
  • ac2a633047 Regenerated services, and the callers that love them. Ray Greenwell 2009-08-13 06:18:26 +00:00
  • 20f3c6add6 Change how the actionscript services are generated, so that the client is not required. Ray Greenwell 2009-08-13 06:17:57 +00:00
  • fe3d89132d A little bit of tweakery so that the invocation director to use is known by any invocation marshaller, and so the client does not need to be passed in. Ray Greenwell 2009-08-13 06:17:28 +00:00
  • 505a9c3a53 Make MessageBundle.getResourceString public so MessageBundles can be composed instead of requiring inheritance to customize them, and open up the bundle creation process in MessageManager to subclass customization Charlie Groves 2009-08-12 20:04:36 +00:00
  • 8ca961fc9d Wait for everything to clear before starting the connection manager, and split out the code called when starting said manager so subclasses can override that Charlie Groves 2009-08-12 20:02:01 +00:00
  • 4780fefb73 Wee cleanup. Ray Greenwell 2009-08-12 18:22:46 +00:00
  • 5aefb2a2a6 Check that interdependent invokers are empty when shutting down the PresentsInvoker in addition to checking the PresentsInvoker itself and the DObjectMgr. Expose waiting for all theses queues to empty on PresentsInvoker such that Presents servers can do things like wait for all the queues to empty before opening to the public. Charlie Groves 2009-08-12 08:29:49 +00:00
  • 5d8a93632e Allow callers to detect when a client is about to die even though it is connected and logged on. This allows handling of the edge case where a client is getting throttled. Jamie Doornbos 2009-08-05 22:12:16 +00:00
  • 4dc85174ba Fix for NPE in closing datagram channel. Andrzej Kapolka 2009-08-04 19:41:01 +00:00
  • 5099dc9d96 Mark run() as an override since it is. Mike Thomas 2009-08-04 18:23:55 +00:00
  • c3e31440ab Comment some fiddliness. Michael Bayne 2009-08-04 16:48:21 +00:00
  • 9ce8a7ac71 Moved our peer-aware cron service into Presents from MSOY. Michael Bayne 2009-08-01 23:01:40 +00:00
  • d0d5c2805e StringUtil got moved to flash-utils. Michael Bayne 2009-07-30 21:55:40 +00:00
  • c0499674e9 Allow an InvocationListener interface to extend another InvocationListener interface. The way this works is a little tricky, but it all works out. Michael Bayne 2009-07-28 21:34:13 +00:00
  • 5dc71a9b8e Preserve varargs in generated marshallers and providers to keep Eclipse from getting in a snit about it Charlie Groves 2009-07-24 23:39:35 +00:00
  • 805ef99374 Various utility classes moved to flash-utils. Michael Bayne 2009-07-21 20:56:35 +00:00
  • f005c3e3a8 Removed unused imports Jamie Doornbos 2009-07-21 14:56:04 +00:00
  • a6478daf0f That ended up being called PresentsTestBase. Michael Bayne 2009-07-21 00:33:18 +00:00