issue #2771: enhance Listener use EventListener mechanism
issue #2771: fix some code style