示例#1
0
    def __init__(self):
        """
        Method:    __init__
        Description: 构造函数
        Parameter: 无
        Return: 
        Others: 
        """

        bf.BasicApp.__init__(self, "Monitor")
        
                
        self.__cluster_node = None
        
        self.__name_manage_worker = None
        self.__process_mointor_worker = None
        
        event_sender.set_local_app(self)
示例#2
0
    def _ready_for_work(self):
        """
        Method: _ready_for_work
        Description: 提供FTP服务,提供FTP用户密码修改,提供FTP用户列表返回
        Parameter: 无
        Return: return_code:FTP服务是否成功运行的返回码
        Others: 无
        """

        bf.BasicApp._ready_for_work(self)  
        worker = ftp_server_worker.FtpServerWorker()        
        self.register_worker(worker) 
        
        event_sender.set_local_app(self)
        
        self.__ftp_server_manage = ftp_server_manage.FtpServerManage(self)
        return_code = self.__ftp_server_manage.ftp_server_set()
        if return_code!=0:
            return return_code
        self.__ftp_thread = self.__ftp_server_manage.get_ftpthread()
        self.__ftp_thread.set_app(self)
        self.register_watched_thread(self.__ftp_thread)    
        return 0