Adds a listener class.
Notice that there is only one listener allowed for the following classes: {@link Monitor}, {@link PerformanceMeter}, and {@link DesktopRecycle}. On the other hand, any number listeners are allowed for other classes.
Notice that if the listener implements {@link Composer}, it can also implement {@link org.zkoss.zk.ui.util.ComposerExt} and/or {@link org.zkoss.zk.ui.util.FullComposer} to havemore detailed control. However, ComposerExt and FullComposer are meaningless to richlets. In additions, an independent composer is instantiated for each page so there is synchronization required.
@param klass the listener class must implement at least one of{@link Monitor}, {@link PerformanceMeter}, {@link EventThreadInit}, {@link EventThreadCleanup}, {@link EventThreadSuspend}, {@link EventThreadResume}, {@link WebAppInit}, {@link WebAppCleanup}, {@link SessionInit}, {@link SessionCleanup}, {@link DesktopInit}, {@link DesktopCleanup}, {@link ExecutionInit}, {@link ExecutionCleanup}, {@link Composer}, {@link VariableResolver}, {@link URIInterceptor}, {@link RequestInterceptor}, {@link UiLifeCycle}, {@link DesktopRecycle}, and/or {@link EventInterceptor} interfaces.
@see Desktop#addListener