Ejemplo n.º 1
0
        /// <summary>
        /// This method registers the push message server to test automation server in app.
        /// </summary>
        public void RegisterPushMessageServer()
        {
            // method entry log message
            // this.log.Trace("RegisterPushMessageServer(...) - running...");

            // create uri
            var uri = this.uriCreator.GetAppComInterfaceUri();

            // create message
            var pushMessageServerUri = UriCreator.BuildUri(this.pushMessageServer.Host, this.pushMessageServer.Port);
            var appComMessage        =
                RequestCreator.CreateRegisterResponseServerRequest(
                    pushMessageServerUri.ToString(),
                    this.pushMessageProcessor.Token);

            // send message
            this.appComProtocolLayer.Post(uri.ToString(), appComMessage);
            // this.log.Debug("RegisterPushMessageServer(...) - Push message server '{0}' registered", pushMessageServerUri);

            // enable all notifications
            this.EnableTerminalNotifications();
            // this.log.Info("RegisterPushMessageServer(...) - terminal notifications enabled.");

            // method exit log message
            // this.log.Trace("RegisterPushMessageServer(...) - done");
        }