Ejemplo n.º 1
0
        public override void run()
        {
            LOG.INFO("ClientRegister start");
            while (!isStopping())
            {
                try
                {
                    if (SyncThread.getInstance() != null)
                    {
                        if (doRegister(SyncThread.getSyncEngine()))
                        {
                            m_nPollInterval = POLL_INTERVAL_INFINITE;
                            //break;
                        }
                    }
                }catch (Exception exc)
                {
                    LOG.ERROR("doRegister failed", exc);
                }

                LOG.INFO("Waiting for " + m_nPollInterval + " sec to try again to register client");
                wait(m_nPollInterval);
            }
            LOG.INFO("ClientRegister thread shutdown");
        }
Ejemplo n.º 2
0
        public String getRegisterBody(String strClientID)
        {
            int port = RhoConf.getInstance().getInt("push_port");

            return(SyncThread.getSyncEngine().getProtocol().getClientRegisterBody(strClientID, m_strDevicePin,
                                                                                  port > 0 ? port : DEFAULT_PUSH_PORT, RHODESAPP().getPlatform()));
        }