that would be super nice. I still was not able to implement a replacement
method, so I am hopeful the lead will approve.
Best
On Thu, Jul 3, 2008 at 5:38 AM, Jeanfrancois Arcand <
Jeanfrancois.Arcand_at_sun.com> wrote:
> Salut
>
> Cam Bazz wrote:
>
>>
>>
>> yes it will be greatly helpful if you could add them also to the 1.0.20
>>
>>
> Done in 1.8.1. For 1.0.20, it will take a little time as I need to
> convince the lead to let me add the API :-)
>
> I need the list of comet handlers so once can get the number of current
>> users. since there is no practical way of getting number of open sessions in
>> glassfish.
>>
>> If I were to keep a list of handlers myself, I would do that inside the
>> doGet method where we create a new handler, right?
>>
>> and also where do I grab the comethandler id at creation time?
>>
>
> By default, CometHandler.hashCode is the id Grizzly Comet use. When you
> call CometContext.addCometHandler, that value is returned.
>
> A+
>
> - Jeanfrancois
>
>
>
>
>
>>
>>
>> Best.
>>
>>
>> On Wed, Jul 2, 2008 at 6:53 PM, Jeanfrancois Arcand <
>> Jeanfrancois.Arcand_at_sun.com <mailto:Jeanfrancois.Arcand_at_sun.com>> wrote:
>>
>> Salut,
>>
>>
>> Cam Bazz wrote:
>>
>> Hello,
>>
>> I have included the grizzly 1.20 jar and removed the
>> appserv-rt.jar and the problem of intterrupt not firing is gone.
>>
>> now these problems are solved, I can do more advanced comet
>> kung-foo.
>>
>>
>> LOL...Great!
>>
>>
>>
>>
>> I am curious in the following three subjects:
>>
>> a. how can I notify a specific comet lisnener? right now I am
>> notifying everyone with context.notify(null);
>>
>>
>> Use this CometContext API:
>>
>> 6 /**
>> 457 * Notify a single {_at_link CometHandler}. The attachment
>> can be null.
>> 458 * The <code>type</code> will determine which
>> code>CometHandler</code> 459 * method will be invoked:
>> 460 * <pre><code>
>> 461 * CometEvent.INTERRUPT ->
>> <code>CometHandler.onInterrupt</code>
>> 462 * CometEvent.NOTIFY -> <code>CometHandler.onEvent</code>
>> 463 * CometEvent.INITIALIZE ->
>> <code>CometHandler.onInitialize</code>
>> 464 * CometEvent.TERMINATE ->
>> <code>CometHandler.onTerminate</code>
>> 465 * CometEvent.READ -> <code>CometHandler.onEvent</code>
>> 466 * </code></pre>
>> 467 * @param attachment An object shared amongst {_at_link
>> CometHandler}. 468 * @param type The type of notification.
>> 469 * @param cometHandlerID Notify a single CometHandler.
>> 470 */
>> 471 public void notify(final E attachment,final int
>> eventType,final int cometHandlerID)
>>
>>
>>
>> b. what kind of datastructure must be used to track users
>> connected?
>>
>>
>> You need to maintain your own list of CometHandler...but can you
>> gives me more information about why you need access those
>> CometHandler> I'm asking because I think it should be a good idea to
>> have a public API on CometContext to get the current list of
>> connected users. Something like:
>>
>> public List<CometHandler> getCometHandlers();
>>
>>
>>
>> c. is there anyway to get the number of total long polling clients?
>>
>>
>> Another reason to add the getCometHandlers() :-) So far there is no
>> such API available.
>>
>> I can add that API to Grizzly 1.0.20 and 1.8.0.1 <http://1.8.0.1> if
>> you think that will be useful.
>>
>> Thanks,
>>
>>
>> -- Jeanfrancois
>>
>>
>>
>> Best,
>>
>> -C.B.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> <mailto:users-unsubscribe_at_grizzly.dev.java.net>
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>> <mailto:users-help_at_grizzly.dev.java.net>
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>