This forum has been archived. Please start a new discussion on GitHub.


I have several "observer" interfaces, such as
interface GainObserver
    void gainUpdated(int gain);

interface OffsetObserver
    void offsetUpdated(int offset);

and so on.

Since the event messages are opaque to IceStorm, can I send events from the multiple interfaces over a single topic by having unchecked proxies for each observer interface (using uncheckedCast on the topic proxy)?

On the subscriber side, can I then use a subscriber implemented as a dispatch interceptor to dispatch each event to a different handler based on the method name?

I know I could just have a separate topic for each observer type, but there are those who will not accept such a multiplicity of topics/service...



  • bernard
    bernard Jupiter, FL
    Hi Mark,

    Yes, I believe this should work, although it's a bit "hacky". IceStorm does not know and as a result can't enforce type-ids or operation names.

    One concern is the maintainability of such code. Is it really worth it? Adding more topics is not that much overhead.