jeasse icon indicating copy to clipboard operation
jeasse copied to clipboard

Need way to propagate completion

Open nilskp opened this issue 6 years ago • 3 comments

Unless I'm missing something, there doesn't seem to be a way to propagate that an event stream is being closed, either from client or error/timeout.

I can see multiple ways to resolve this:

  • take an AsyncContext instead of HttpServletRequest in ServletEventTarget constructor.
  • provide access to ServletEventTarget's asyncContext.
  • expose method to register an AsyncListener on ServletEventTarget

Or is there another way?

nilskp avatar Apr 09 '18 22:04 nilskp

Funny that you ask. If you checkout https://github.com/arkanovicz/jeasse.git you'll see an implementation proposal for your third suggestion (I don't understand why I can't see those commits on github web interface, it's probably because I commited them on the same branch I used to make the pending pull request).

arkanovicz avatar Apr 10 '18 01:04 arkanovicz

Sorry @arkanovicz I didn't noticed there was a pull request on this repository. Thank you very much!

Just let me some time to review and merge it.

mariomac avatar Apr 10 '18 09:04 mariomac

@mariomac Any progress? It would be nice with a fresh release.

nilskp avatar May 03 '18 21:05 nilskp