Atmosphere/atmosphere — Issue #76: Add feature to intercept broadcasted message to AtmosphereHandler ?
Author: survivant
Created: 2011-11-25 13:38:36+00:00
State: open

I would propose to add this feature in the next release.

Because Atmophere will support custom protocol, it would be nice to be able to intercept message before they are send to AtmopshereHandler.onStateChange (example)

The goal could be to remove the need to implements onStateChange and replace it by another Interface. If that Interface is implemented in out AtmosphereHandler, it will be used. Heu.. ok.. explaination.

Suppose that my protocol support events like : onClose, onDisconnect, onConnect, onTimeout, onResume.....

I want these events to be transparent to the user. Instead of implementing onStateChange... for resume and close and dispatch the event into the Handler...

I think it could be useful to intercept theses event.. and dispatch to the appropriate method : onTimeout...

I don't want to force the user the extends a CustomAtmopshereHandler just to do that, if it could be done by the protocol implementation and hide from the user.