Skip to main content

[jsr356-experts] Re: [jsr356-users] Re: Call precedence of multiple MessageHandlers

  • From: Scott Ferguson < >
  • To: Danny Coward < >
  • Cc:
  • Subject: [jsr356-experts] Re: [jsr356-users] Re: Call precedence of multiple MessageHandlers
  • Date: Wed, 07 Nov 2012 10:05:19 -0800

On 11/6/12 3:41 PM, Danny Coward wrote:
" type="cite">
On 11/2/12 5:36 PM, Scott Ferguson wrote:
" type="cite">
On 11/2/12 4:59 PM, Danny Coward wrote:
" type="cite"> Hi folks,

Another question that has come up as people look at the API and implement it is the issue of precedence when an endpoint has multiple MessageHandlers. I wrote up a little proposal that seeks to define how the container is supposed to select which of potentially numerous of MessageHandlers to callwhen a web socket message arrives.

I've been working through this in our implementation. (Decoders is a different/related/bigger issue.)

More comments inline, but the summary is I think it's best to only allow one Text handler and one Binary handler, and throw an IllegalStateException at registration time if more than one of each type is registered.
Yeah I think I agree with everyone: what I wrote up is too complicated.

But let me make sure I understand, are you thinking that you'd only allow one of any of the several different text-message handlers: {MessageHandler.Text, MessageHandler.AsyncText, MessageHandler.DecodedObject<T> with Decoder.Text<T> or Decoder.TextStream<T>} to be registered per connection, and one of the several different binary-message handlers {analogous list} to be registered ? So you can have at most two handlers per connection, and the developer has to pick his mode of consumption for both text and binary?

Yes. That's what I was thinking.

In practice, I'd expect most sub-protocols would be either text or binary but not both. (Not enforced, of course.)

-- Scott



[jsr356-experts] Call precedence of multiple MessageHandlers

Danny Coward 11/02/2012

[jsr356-experts] Re: [jsr356-users] Call precedence of multiple MessageHandlers

Scott Ferguson 11/03/2012

[jsr356-experts] Re: [jsr356-users] Call precedence of multiple MessageHandlers

Mark Thomas 11/03/2012

[jsr356-experts] Re: [jsr356-users] Call precedence of multiple MessageHandlers

Justin Lee 11/05/2012

[jsr356-experts] Re: [jsr356-users] Re: Call precedence of multiple MessageHandlers

Danny Coward 11/06/2012

[jsr356-experts] Re: [jsr356-users] Re: Call precedence of multiple MessageHandlers

Scott Ferguson 11/07/2012

[jsr356-experts] Re: Call precedence of multiple MessageHandlers

Danny Coward 11/08/2012

[jsr356-experts] Re: Call precedence of multiple MessageHandlers

Scott Ferguson 11/08/2012

[jsr356-experts] MessageHandler options: was Re: Call precedence of multiple MessageHandlers

Danny Coward 11/10/2012
 
 
Close
loading
Please Confirm
Close