Remy Maucherat wrote:
[EMAIL PROTECTED] wrote:
Author: fhanik
Date: Thu May 10 04:30:29 2007
New Revision: 536830

URL: http://svn.apache.org/viewvc?view=rev&rev=536830
Log:
New proposed API calls for Comet
+    /**
+     * notification bit to receive an event
+     * immediately, the event will be NOTIFY/WRITE
+     * @see #register(int)
+     */
+    public static final int OP_NOW = 0x001;
+    +    /**
+     * notification bit to receive an event when
+     * data has arrived on the connection
+     * Event will be READ
+     * @see #register(int)
+     * @see CometProcessor#event(CometEvent)
+     */
+    public static final int OP_READ = 0x004;

Besides the cute boolean tricks that are soooo cool, I think an enum should be used.
it's more than just cool, its extremely practical.
If I only want to "unregister READ", all I have to do is register(getRegisteredOps() & (~OP_READ)) with the enums, that are not as cool, I need a little piece of code that singles it out.

I'll leave the enum in there, but if you change your mind, I like the "and/or" tricks, and be happy to stick them back in,
it's just not worth delaying the impl effort for

Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to