tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: svn commit: r536830 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina: CometEvent.java connector/CometEventImpl.java
Date Thu, 10 May 2007 15:10:53 GMT
Remy Maucherat wrote:
> fhanik@apache.org 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message