コード例 #1
0
        private void addRemoteListener(String ename, ContextEventListener contextEventListener)
        {
            var hashCode = contextEventListener.getListenerCode();

            if (hashCode == null && AUTO_LISTENED_EVENTS.Contains(ename))
            {
                return;
            }

            if (!notManageRemoteListenersBoolean)
            {
                controller.sendCommandAndCheckReplyCode(ClientCommandUtils.addEventListenerOperation(this.getPath(), ename, hashCode));
            }
        }
コード例 #2
0
 private void sendAddListener(String context, String eventString, ContextEventListener listener)
 {
     try
     {
         getController().sendCommandAndCheckReplyCode(ClientCommandUtils.addEventListenerOperation(context,
                                                                                                   eventString,
                                                                                                   listener.
                                                                                                   getListenerCode
                                                                                                       ()));
     }
     catch (Exception ex)
     {
         var msg = String.Format(Cres.get().getString("conErrAddingListener"), eventString, context);
         throw new InvalidOperationException(msg + ": " + ex.Message, ex);
     }
 }