Yes, I'd prefer to merge the previous two listeners into one. Main reason is normally usage will listen to 'onConnect'  and 'onDisonnect' together. Even there is only one listener setup on javascript side, there is no hard to send all event to javascript side. This will make the Java code looks much nicer.