Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[messaging-dev] [MessageListenerAsSelector] How about passing a MessageListener as the selector?

Hello Experts,

Presently the JMSContext accepts a String as the selector. How about we allow passing a MessageListener?

To make this work we could add a default no-op implementation of the existing onMessage() method, and add an overloaded onMessage(), also with a default no-op implementation, that returns boolean instead of void.

With that API in place, we could alter the contract for all the places that accept a string selector to have variants that accept a MessageListener. 

Ed

Back to the top