summaryrefslogtreecommitdiff
path: root/src/com/nis/nmsclient/model
diff options
context:
space:
mode:
authorchenjinsong <[email protected]>2018-09-27 16:11:54 +0800
committerchenjinsong <[email protected]>2018-09-27 16:11:54 +0800
commit56d71f261a8bd6031e47e2bf80867049a2aa13da (patch)
treef09257b2143782a333a9eda3395137837d9bdad1 /src/com/nis/nmsclient/model
initial commit
Diffstat (limited to 'src/com/nis/nmsclient/model')
-rw-r--r--src/com/nis/nmsclient/model/AlarmInfo.java184
-rw-r--r--src/com/nis/nmsclient/model/CommandPO.java86
-rw-r--r--src/com/nis/nmsclient/model/ParamBackup.java52
-rw-r--r--src/com/nis/nmsclient/model/ParamCmdExec.java111
-rw-r--r--src/com/nis/nmsclient/model/ParamCoverUpdate.java62
-rw-r--r--src/com/nis/nmsclient/model/ParamFilePush.java81
-rw-r--r--src/com/nis/nmsclient/model/ParamUpgrade.java174
-rw-r--r--src/com/nis/nmsclient/model/ReturnFilePO.java106
-rw-r--r--src/com/nis/nmsclient/model/SetInfo.java272
-rw-r--r--src/com/nis/nmsclient/model/Task1.java49
-rw-r--r--src/com/nis/nmsclient/model/Task4.java166
-rw-r--r--src/com/nis/nmsclient/model/Task6.java121
12 files changed, 1464 insertions, 0 deletions
diff --git a/src/com/nis/nmsclient/model/AlarmInfo.java b/src/com/nis/nmsclient/model/AlarmInfo.java
new file mode 100644
index 0000000..58d85e6
--- /dev/null
+++ b/src/com/nis/nmsclient/model/AlarmInfo.java
@@ -0,0 +1,184 @@
+package com.nis.nmsclient.model;
+
+/**
+ * 监测信息报警相关信息实体
+ *
+ */
+public class AlarmInfo {
+ /**
+ * 告警设置id
+ */
+ private Long id;
+ /**
+ * 监测设置id
+ */
+ private Long setInfoId;
+ /**
+ * 监测类型
+ */
+ private String checkType;
+ /**
+ * 进程设置名称
+ */
+ private String processIden;
+ /**
+ * 字段Id
+ */
+ private Long metadataId;
+ /**
+ * 字段描述
+ */
+ private String filedCommonts;
+ /**
+ * 字段序号
+ */
+ private Integer showNum;
+ /**
+ * 报警状态
+ */
+ private String policeState;
+ /**
+ * 报警值
+ */
+ private String policeValue;
+ /**
+ * 报警单位
+ */
+ private String policeUnit;
+ /**
+ * 报警比较符:针对number型数据>、<、>=、<=、= 针对字符串类型数据equal、 include、exclude
+ */
+ private String policeSysmbols;
+ /**
+ * 报警等级
+ */
+ private Integer policeLevel;
+ /**
+ * 设置告警时,指定多个标识符(如多个盘符、多个CPU、多个网卡),如硬盘使用率,空:所有盘存在一个盘使用率超过告警值,则告警;all:所有盘总的使用率超过告警值,则告警;指定多个盘符:指定盘存在一个盘使用率超过告警值,则告警
+ */
+ private String marker;
+ /**
+ * 标识符对应字段在metadata表中的id
+ */
+ private Integer markerFiledId;;
+ /**
+ * 标识符对应字段在metadata表中的showNum
+ */
+ private Integer markerFiledShowNum;
+
+
+ public Long getSetInfoId() {
+ return setInfoId;
+ }
+ public void setSetInfoId(Long setInfoId) {
+ this.setInfoId = setInfoId;
+ }
+ public Long getMetadataId() {
+ return metadataId;
+ }
+ public void setMetadataId(Long metadataId) {
+ this.metadataId = metadataId;
+ }
+ public Integer getShowNum() {
+ return showNum;
+ }
+ public void setShowNum(Integer showNum) {
+ this.showNum = showNum;
+ }
+ public String getPoliceState() {
+ return policeState;
+ }
+ public void setPoliceState(String policeState) {
+ this.policeState = policeState;
+ }
+ public String getPoliceUnit() {
+ return policeUnit;
+ }
+ public void setPoliceUnit(String policeUnit) {
+ this.policeUnit = policeUnit;
+ }
+ public String getPoliceSysmbols() {
+ return policeSysmbols;
+ }
+ public void setPoliceSysmbols(String policeSysmbols) {
+ this.policeSysmbols = policeSysmbols;
+ }
+
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public Integer getPoliceLevel() {
+ return policeLevel;
+ }
+ public void setPoliceLevel(Integer policeLevel) {
+ this.policeLevel = policeLevel;
+ }
+ public String getCheckType() {
+ return checkType;
+ }
+ public void setCheckType(String checkType) {
+ this.checkType = checkType;
+ }
+ public String getProcessIden() {
+ return processIden;
+ }
+ public void setProcessIden(String processIden) {
+ this.processIden = processIden;
+ }
+ public String getFiledCommonts() {
+ return filedCommonts;
+ }
+ public void setFiledCommonts(String filedCommonts) {
+ this.filedCommonts = filedCommonts;
+ }
+ public String getPoliceValue() {
+ return policeValue;
+ }
+ public void setPoliceValue(String policeValue) {
+ this.policeValue = policeValue;
+ }
+
+ public String toString() {
+ return "showNum=" + showNum + ",policeSysmbols=" + policeSysmbols
+ + ",policeValue=" + policeValue + ",policeLevel=" + policeLevel;
+ }
+
+ public String toStringVal(){
+ return showNum + "|" + policeSysmbols + "|" + policeValue + "|"
+ + policeLevel + "|" + filedCommonts;
+ }
+
+ public String getMarker()
+ {
+ return marker;
+ }
+
+ public void setMarker(String marker)
+ {
+ this.marker = marker;
+ }
+
+ public Integer getMarkerFiledId()
+ {
+ return markerFiledId;
+ }
+
+ public void setMarkerFiledId(Integer markerFiledId)
+ {
+ this.markerFiledId = markerFiledId;
+ }
+
+ public Integer getMarkerFiledShowNum()
+ {
+ return markerFiledShowNum;
+ }
+
+ public void setMarkerFiledShowNum(Integer markerFiledShowNum)
+ {
+ this.markerFiledShowNum = markerFiledShowNum;
+ }
+
+}
diff --git a/src/com/nis/nmsclient/model/CommandPO.java b/src/com/nis/nmsclient/model/CommandPO.java
new file mode 100644
index 0000000..0644924
--- /dev/null
+++ b/src/com/nis/nmsclient/model/CommandPO.java
@@ -0,0 +1,86 @@
+package com.nis.nmsclient.model;
+
+public class CommandPO {
+ /**
+ * ID
+ */
+ private Long execId;
+ /**
+ * 类型:4 命令执行,6 升级
+ */
+ private long execType;
+ /**
+ * 升级文件存放目录
+ */
+ private String srcPath;
+ /**
+ * 命令名称
+ */
+ private String commandName;
+ /**
+ * 命令参数
+ */
+ private String commandParam;
+ /**
+ * 执行状态:4下发任务(40 下发成功,41下发失败),5杀进程(50成功,51失败)、6备份、7更新(覆盖) 、8启动进程
+ */
+ private long execState;
+ /**
+ * 恢复版本
+ */
+ private Long execVersion;
+ /**
+ * 是否周期任务
+ */
+ private long isLoop;
+
+ public Long getExecId() {
+ return execId;
+ }
+ public void setExecId(Long execId) {
+ this.execId = execId;
+ }
+ public long getExecType() {
+ return execType;
+ }
+ public void setExecType(long execType) {
+ this.execType = execType;
+ }
+ public String getSrcPath() {
+ return srcPath;
+ }
+ public void setSrcPath(String srcPath) {
+ this.srcPath = srcPath;
+ }
+ public String getCommandName() {
+ return commandName;
+ }
+ public void setCommandName(String commandName) {
+ this.commandName = commandName;
+ }
+ public String getCommandParam() {
+ return commandParam;
+ }
+ public void setCommandParam(String commandParam) {
+ this.commandParam = commandParam;
+ }
+ public long getExecState() {
+ return execState;
+ }
+ public void setExecState(long execState) {
+ this.execState = execState;
+ }
+ public Long getExecVersion() {
+ return execVersion;
+ }
+ public void setExecVersion(Long execVersion) {
+ this.execVersion = execVersion;
+ }
+ public long getIsLoop() {
+ return isLoop;
+ }
+ public void setIsLoop(long isLoop) {
+ this.isLoop = isLoop;
+ }
+
+}
diff --git a/src/com/nis/nmsclient/model/ParamBackup.java b/src/com/nis/nmsclient/model/ParamBackup.java
new file mode 100644
index 0000000..5deac2a
--- /dev/null
+++ b/src/com/nis/nmsclient/model/ParamBackup.java
@@ -0,0 +1,52 @@
+package com.nis.nmsclient.model;
+
+/**
+ * 备份命令的参数实体类
+ * @date Mar 23, 2012
+ * @author zhenzhen
+ * @version
+ */
+public class ParamBackup{
+ /**
+ * 需要备份的文件或目录
+ */
+ private String backup = null;
+ /**
+ * 备份文件到的目的路径
+ */
+ private String backupTo = null;
+ /**
+ * 排除的文件或目录,即不需要备份的,如果是相对路径,则相对需要备份的文件或目录
+ */
+ private String[] except = null;
+ /**
+ * 备份压缩包时:Y 按绝对路径压缩,N 按进入备份目录压缩(这个属性只针对Linux有效,Windows下只按进入备份目录压缩)
+ */
+ private String isAbs = null;
+
+ public String getBackup() {
+ return backup;
+ }
+ public void setBackup(String backup) {
+ this.backup = backup;
+ }
+ public String getBackupTo() {
+ return backupTo;
+ }
+ public void setBackupTo(String backupTo) {
+ this.backupTo = backupTo;
+ }
+ public String[] getExcept() {
+ return except;
+ }
+ public void setExcept(String[] except) {
+ this.except = except;
+ }
+ public String getIsAbs() {
+ return isAbs;
+ }
+ public void setIsAbs(String isAbs) {
+ this.isAbs = isAbs;
+ }
+
+} \ No newline at end of file
diff --git a/src/com/nis/nmsclient/model/ParamCmdExec.java b/src/com/nis/nmsclient/model/ParamCmdExec.java
new file mode 100644
index 0000000..c66b6a5
--- /dev/null
+++ b/src/com/nis/nmsclient/model/ParamCmdExec.java
@@ -0,0 +1,111 @@
+package com.nis.nmsclient.model;
+
+/**
+ * 命令执行(启动命令)的参数实体类
+ * @date Mar 23, 2012
+ * @author zhenzhen
+ * @version
+ */
+public class ParamCmdExec {
+ /**
+ * 执行文件或命令
+ */
+ private String execCmd;
+ /**
+ * 执行文件或命令的参数序列
+ */
+ private String[] execParams;
+ /**
+ * 该命令是否强制执行:Y是,N否
+ */
+ private String forceExec;
+ /**
+ * 常驻内存标识: Y是,N否
+ */
+ private String residentFlag;
+ /**
+ * 存放执行结果标识的文件:1、常驻内存的,写入PID,2、非常驻的,写执行结果:结果标识(0 成功 1 失败)|结果描述
+ */
+ private String execResult;
+ /**
+ * 回传标识: Y是,N否
+ */
+ private String returnFlag;
+ /**
+ * 回传文件或目录路径
+ */
+ private String returnPath;
+ /**
+ * 最终结果获取最大等待时间(单位:秒)
+ */
+ private String maxWaitTime;
+ /**
+ * 执行文件或命令的用户名(只针对Linux有效)
+ */
+ private String username;
+ /**
+ * 执行用户的密码(只针对Linux有效)
+ */
+ private String param1;
+
+ public String getExecCmd() {
+ return execCmd;
+ }
+ public void setExecCmd(String execCmd) {
+ this.execCmd = execCmd;
+ }
+ public String getForceExec() {
+ return forceExec;
+ }
+ public void setForceExec(String forceExec) {
+ this.forceExec = forceExec;
+ }
+ public String getResidentFlag() {
+ return residentFlag;
+ }
+ public void setResidentFlag(String residentFlag) {
+ this.residentFlag = residentFlag;
+ }
+ public String getExecResult() {
+ return execResult;
+ }
+ public void setExecResult(String execResult) {
+ this.execResult = execResult;
+ }
+ public String getReturnFlag() {
+ return returnFlag;
+ }
+ public void setReturnFlag(String returnFlag) {
+ this.returnFlag = returnFlag;
+ }
+ public String getReturnPath() {
+ return returnPath;
+ }
+ public void setReturnPath(String returnPath) {
+ this.returnPath = returnPath;
+ }
+ public String getMaxWaitTime() {
+ return maxWaitTime;
+ }
+ public void setMaxWaitTime(String maxWaitTime) {
+ this.maxWaitTime = maxWaitTime;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public String[] getExecParams() {
+ return execParams;
+ }
+ public void setExecParams(String[] execParams) {
+ this.execParams = execParams;
+ }
+ public String getParam1() {
+ return param1;
+ }
+ public void setParam1(String param1) {
+ this.param1 = param1;
+ }
+}
diff --git a/src/com/nis/nmsclient/model/ParamCoverUpdate.java b/src/com/nis/nmsclient/model/ParamCoverUpdate.java
new file mode 100644
index 0000000..3d731d4
--- /dev/null
+++ b/src/com/nis/nmsclient/model/ParamCoverUpdate.java
@@ -0,0 +1,62 @@
+package com.nis.nmsclient.model;
+
+/**
+ * 覆盖更新的参数实体类
+ * @date Mar 23, 2012
+ * @author zhenzhen
+ * @version
+ */
+public class ParamCoverUpdate{
+ /**
+ * 指定更新需要的文件
+ */
+ private String source = null;
+ /**
+ * 指定文件覆盖目录
+ */
+ private String cover = null;
+ /**
+ * 是否创建覆盖目录
+ */
+ private String isCreateCover = null;
+ /**
+ * 删除的文件或目录,如果是相对路径,则相对需要更新的目录
+ */
+ private String[] delete = null;
+ /**
+ * 如果更新源文件是个压缩包:Y 按绝对路径解压即在根目录下解压,N 按进入备份目录解压(这个属性只针对Linux有效,Windows下只按进入备份目录解压)
+ */
+ private String isAbs = null;
+
+ public String getSource() {
+ return source;
+ }
+ public void setSource(String source) {
+ this.source = source;
+ }
+ public String getCover() {
+ return cover;
+ }
+ public void setCover(String cover) {
+ this.cover = cover;
+ }
+ public String getIsCreateCover() {
+ return isCreateCover;
+ }
+ public void setIsCreateCover(String isCreateCover) {
+ this.isCreateCover = isCreateCover;
+ }
+ public String[] getDelete() {
+ return delete;
+ }
+ public void setDelete(String[] delete) {
+ this.delete = delete;
+ }
+ public String getIsAbs() {
+ return isAbs;
+ }
+ public void setIsAbs(String isAbs) {
+ this.isAbs = isAbs;
+ }
+
+} \ No newline at end of file
diff --git a/src/com/nis/nmsclient/model/ParamFilePush.java b/src/com/nis/nmsclient/model/ParamFilePush.java
new file mode 100644
index 0000000..e775e22
--- /dev/null
+++ b/src/com/nis/nmsclient/model/ParamFilePush.java
@@ -0,0 +1,81 @@
+package com.nis.nmsclient.model;
+
+/**
+ * 文件推送的参数实体类
+ * @date Mar 23, 2012
+ * @author zhenzhen
+ * @version
+ */
+public class ParamFilePush {
+ /**
+ * 推送文件名
+ */
+ private String fileName;
+ /**
+ * 推送目的地
+ */
+ private String destPath;
+ /**
+ * 是否覆盖:Y是,N否
+ */
+ private String isCover;
+ /**
+ * 推送文件的属主(只针对Linux有效)
+ */
+ private String username;
+ /**
+ * 属主密码(只针对Linux有效)
+ */
+ private String param1;
+ /**
+ * 推送文件的属组(只针对Linux有效)
+ */
+ private String groupName;
+ /**
+ * 推送文件拥有的权限(只针对Linux有效)
+ */
+ private String permisson;
+
+ public String getFileName() {
+ return fileName;
+ }
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+ public String getDestPath() {
+ return destPath;
+ }
+ public void setDestPath(String destPath) {
+ this.destPath = destPath;
+ }
+ public String getIsCover() {
+ return isCover;
+ }
+ public void setIsCover(String isCover) {
+ this.isCover = isCover;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public String getGroupName() {
+ return groupName;
+ }
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
+ }
+ public String getPermisson() {
+ return permisson;
+ }
+ public void setPermisson(String permisson) {
+ this.permisson = permisson;
+ }
+ public String getParam1() {
+ return param1;
+ }
+ public void setParam1(String param1) {
+ this.param1 = param1;
+ }
+}
diff --git a/src/com/nis/nmsclient/model/ParamUpgrade.java b/src/com/nis/nmsclient/model/ParamUpgrade.java
new file mode 100644
index 0000000..891bbf1
--- /dev/null
+++ b/src/com/nis/nmsclient/model/ParamUpgrade.java
@@ -0,0 +1,174 @@
+package com.nis.nmsclient.model;
+
+
+/**
+ * 升级命令的参数实体类
+ * @date Mar 23, 2012
+ * @author zhenzhen
+ * @version
+ */
+public class ParamUpgrade {
+ /**
+ * 指定更新需要的文件,如果是相对路径,则相对推送目的地
+ */
+ private String fileName = null;
+ /**
+ * 指定文件覆盖目录
+ */
+ private String cover = null;
+ /**
+ * 是否创建覆盖目录
+ */
+ private String isCreateCover = null;
+ /**
+ * 如果更新源文件是个压缩包:Y 按绝对路径解压即在根目录下解压,N 按进入备份目录解压(这个属性只针对Linux有效,Windows下只按进入备份目录解压)
+ */
+ private String isAbs = null;
+ /**
+ * 需要删除的目录,如果是相对路径,则相对覆盖目录
+ */
+ private String [] delete = null;
+ /**
+ * 该命令是否强制执行:Y是,N否
+ */
+ private String forceExec;
+ /**
+ * 文件的属主或运行的用户(只针对Linux有效)
+ */
+ private String username;
+ /**
+ * 用户密码(只针对Linux有效)
+ */
+ private String param1;
+ /**
+ * 文件的属组(只针对Linux有效)
+ */
+ private String groupName;
+ /**
+ * 权限设置
+ */
+ private String permisson = null;
+ //以上是升级用到的参数属性,以下是升级和恢复都有的参数属性
+ /**
+ * 备份目录,如果是相对路径,则相对覆盖目录
+ */
+ private ParamBackup [] backups = null;
+ /**
+ * 恢复目录,逆向任务时使用
+ */
+ private ParamCoverUpdate[] recoverys;
+ /**
+ * 进程PID文件全路径
+ */
+ private String pidFile = null;
+ /**
+ * 进程启动文件全路径
+ */
+ private String startupFile = null;
+ /**
+ * 执行文件的参数序列
+ */
+ private String[] execParams;
+ /**
+ * 最终结果获取最大等待时间(单位:秒)
+ */
+ private String maxWaitTime;
+
+ public String getFileName() {
+ return fileName;
+ }
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+ public String getCover() {
+ return cover;
+ }
+ public void setCover(String cover) {
+ this.cover = cover;
+ }
+ public ParamBackup[] getBackups() {
+ return backups;
+ }
+ public void setBackups(ParamBackup[] backups) {
+ this.backups = backups;
+ }
+ public String getPidFile() {
+ return pidFile;
+ }
+ public void setPidFile(String pidFile) {
+ this.pidFile = pidFile;
+ }
+ public String getStartupFile() {
+ return startupFile;
+ }
+ public void setStartupFile(String startupFile) {
+ this.startupFile = startupFile;
+ }
+ public String[] getDelete() {
+ return delete;
+ }
+ public void setDelete(String[] delete) {
+ this.delete = delete;
+ }
+ public String getIsCreateCover() {
+ return isCreateCover;
+ }
+ public void setIsCreateCover(String isCreateCover) {
+ this.isCreateCover = isCreateCover;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public String getPermisson() {
+ return permisson;
+ }
+ public void setPermisson(String permisson) {
+ this.permisson = permisson;
+ }
+ public String getGroupName() {
+ return groupName;
+ }
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
+ }
+ public String getIsAbs() {
+ return isAbs;
+ }
+ public void setIsAbs(String isAbs) {
+ this.isAbs = isAbs;
+ }
+ public String getForceExec() {
+ return forceExec;
+ }
+ public void setForceExec(String forceExec) {
+ this.forceExec = forceExec;
+ }
+ public String getMaxWaitTime() {
+ return maxWaitTime;
+ }
+ public void setMaxWaitTime(String maxWaitTime) {
+ this.maxWaitTime = maxWaitTime;
+ }
+ public void setExecParams(String[] execParams) {
+ this.execParams = execParams;
+ }
+ public String[] getExecParams() {
+ return execParams;
+ }
+ public ParamCoverUpdate[] getRecoverys() {
+ return recoverys;
+ }
+ public void setRecoverys(ParamCoverUpdate[] recoverys) {
+ this.recoverys = recoverys;
+ }
+ public String getParam1() {
+ return param1;
+ }
+ public void setParam1(String param1) {
+ this.param1 = param1;
+ }
+
+}
diff --git a/src/com/nis/nmsclient/model/ReturnFilePO.java b/src/com/nis/nmsclient/model/ReturnFilePO.java
new file mode 100644
index 0000000..e781f42
--- /dev/null
+++ b/src/com/nis/nmsclient/model/ReturnFilePO.java
@@ -0,0 +1,106 @@
+package com.nis.nmsclient.model;
+
+import java.util.Date;
+
+public class ReturnFilePO {
+ /**
+ * ID
+ */
+ private Long taskId;
+ /**
+ * 类型:4 命令执行,6 升级
+ */
+ private long taskType;
+ /**
+ * 唯一标志一台物理机(类似于IP)
+ */
+ private long uuid;
+ /**
+ * 回传路径集: key 文件实际路径 value 文件别名
+ */
+// private Map<String, String> filePathMap;
+ /**
+ * 当前要回传的文件
+ */
+// private File curRetrunFile;
+ /**
+ * 回传文件名(统一处理后一个任务只有一个回传文件)
+ */
+ private String returnFileName;
+ /**
+ * 回传状态:0 成功,1 失败
+ */
+ private long state;
+ /**
+ * 开始时间
+ */
+ private Date startTime;
+ /**
+ * 结束时间
+ */
+ private Date endTime;
+ /**
+ * 是否循环任务
+ */
+ private long isLoop;
+ /**
+ * 回传文件的结果描述
+ */
+ private String resDesc;
+
+ public Long getTaskId() {
+ return taskId;
+ }
+ public void setTaskId(Long taskId) {
+ this.taskId = taskId;
+ }
+ public long getTaskType() {
+ return taskType;
+ }
+ public void setTaskType(long taskType) {
+ this.taskType = taskType;
+ }
+ public long getState() {
+ return state;
+ }
+ public void setState(long state) {
+ this.state = state;
+ }
+ public Date getStartTime() {
+ return startTime;
+ }
+ public void setStartTime(Date startTime) {
+ this.startTime = startTime;
+ }
+ public Date getEndTime() {
+ return endTime;
+ }
+ public void setEndTime(Date endTime) {
+ this.endTime = endTime;
+ }
+ public long getIsLoop() {
+ return isLoop;
+ }
+ public void setIsLoop(long isLoop) {
+ this.isLoop = isLoop;
+ }
+ public String getResDesc() {
+ return resDesc;
+ }
+ public void setResDesc(String resDesc) {
+ this.resDesc = resDesc;
+ }
+ public String getReturnFileName() {
+ return returnFileName;
+ }
+ public void setReturnFileName(String returnFileName) {
+ this.returnFileName = returnFileName;
+ }
+ public long getUuid() {
+ return uuid;
+ }
+ public void setUuid(long uuid) {
+ this.uuid = uuid;
+ }
+
+}
diff --git a/src/com/nis/nmsclient/model/SetInfo.java b/src/com/nis/nmsclient/model/SetInfo.java
new file mode 100644
index 0000000..c0e1338
--- /dev/null
+++ b/src/com/nis/nmsclient/model/SetInfo.java
@@ -0,0 +1,272 @@
+package com.nis.nmsclient.model;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang.builder.ReflectionToStringBuilder;
+
+import com.nis.nmsclient.common.Contants;
+
+/**
+ * 客户端用到的监测设置信息实体
+ *
+ */
+public class SetInfo {
+ /**
+ * 监测设置信息ID
+ */
+ private Long id;
+ /**
+ * 检测类型
+ */
+ private String checkTypeName;//如:CPU、DISK等
+ /**
+ * 检测类型的ID,预留
+ */
+ private Long checkTypeId;
+ /**
+ * 最大测试次数
+ */
+ private Long checkMaxTimes;
+ /**
+ * 时间间隔(单位:分钟)
+ */
+ private Long checkGap;
+ /**
+ * 超时时间(单位:秒)
+ */
+ private Long checkOutTime;
+ /**
+ * 监测状态:0无效;1有效
+ */
+ private String checkState;
+ /**
+ * 监测方式:0主动(DC执行),1被动(NC执行)
+ */
+ private String checkWay;
+ /**
+ * 设置标志
+ */
+ private String processIden;
+ /**
+ * 进程PID存放文件
+ */
+ private String processFile;
+ /**
+ * 进程执行文件
+ */
+ private String processPath;
+ /**
+ * 是否系统启动(NMSAgent启动/第三方自己启动);默认0自启动;1NMSAgent启动
+ */
+ private String IsControlStart;
+ /**
+ * 控制启动时间
+ */
+ private Long controlStartTime;
+ /**
+ *上传数据时间间隔单位分钟:不能为空,默认15分钟。监测数据上传到NMSServer周期。
+ */
+ private Long uploadGap;
+
+ /**
+ * 计划检测时间:针对当前配置信息首次执行时间
+ */
+ private Long planCheckTime;
+ /**
+ * 是否预置监测,0是,1否
+ */
+ private String isSchedule;
+ /**
+ * 进程搜索关键字
+ */
+ private String processSearchKeyCode;
+
+ // ====== 以下信息仅供DC端使用,这里添加是为了不出现WARN信息
+ private String nodeGroupsId;
+ private String nodeIpsId;
+ private Long viewLevel;
+ private String nodeIp2;
+ private Long isSNMP;
+
+ // ======= 保存最后合并的临时结果文件的检测时间(仅用于NC)
+ private Long lastMergeDetecTime;
+
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public String getCheckTypeName() {
+ return checkTypeName;
+ }
+ public void setCheckTypeName(String checkTypeName) {
+ this.checkTypeName = checkTypeName;
+ }
+ public Long getCheckTypeId() {
+ return checkTypeId;
+ }
+ public Long getCheckMaxTimes() {
+ return checkMaxTimes;
+ }
+ public void setCheckMaxTimes(Long checkMaxTimes) {
+ this.checkMaxTimes = checkMaxTimes;
+ }
+ public Long getCheckGap() {
+ return checkGap;
+ }
+ public void setCheckGap(Long checkGap) {
+ this.checkGap = checkGap;
+ }
+ public Long getCheckOutTime() {
+ return checkOutTime;
+ }
+ public void setCheckOutTime(Long checkOutTime) {
+ this.checkOutTime = checkOutTime;
+ }
+ public String getCheckState() {
+ return checkState;
+ }
+ public void setCheckState(String checkState) {
+ this.checkState = checkState;
+ }
+ public String getProcessIden() {
+ return processIden;
+ }
+ public void setProcessIden(String processIden) {
+ this.processIden = processIden;
+ }
+ public String getProcessFile() {
+ return processFile;
+ }
+ public void setProcessFile(String processFile) {
+ this.processFile = processFile;
+ }
+ public String getProcessPath() {
+ return processPath;
+ }
+ public void setProcessPath(String processPath) {
+ this.processPath = processPath;
+ }
+ public void setCheckTypeId(Long checkTypeId) {
+ this.checkTypeId = checkTypeId;
+ }
+ public String getCheckWay() {
+ return checkWay;
+ }
+ public void setCheckWay(String checkWay) {
+ this.checkWay = checkWay;
+ }
+
+ public String[] getValArr(Long uuid, String dataFileDir) {
+ List<String> list = new ArrayList<String>();
+ list.add("pubInfo=" + uuid + "," + id + "," + checkTypeName + "," + processIden);
+ list.add("checkState=" + checkState);
+ //list.add("checkWay=" + checkWay);
+ //list.add("isControlStart=" + IsControlStart);
+ //list.add("controlStartTime=" + controlStartTime);
+ list.add("checkGap=" + checkGap);
+ list.add("checkOutTime=" + checkOutTime);
+ list.add("checkMaxTimes=" + checkMaxTimes);
+ //list.add("processFile=" + processFile);
+ //list.add("processPath=" + processPath);
+ list.add("planCheckTime=" + planCheckTime);
+ list.add("uploadGap=" + uploadGap);
+ list.add("dataFileDir=" + dataFileDir);
+
+ try {
+ if("1".equals(isSchedule)) { // 第三方监测
+ File dataDir = new File(dataFileDir);
+ File tempDataDir = new File(Contants.localTempDataIncomingPath, dataDir.getName());
+ list.add("tempDataFileDir=" + tempDataDir.getCanonicalPath());
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ String[] val = new String[list.size()];
+ return list.toArray(val);
+ }
+ public String getIsControlStart() {
+ return IsControlStart;
+ }
+ public void setIsControlStart(String isControlStart) {
+ IsControlStart = isControlStart;
+ }
+ public Long getUploadGap() {
+ return uploadGap;
+ }
+ public void setUploadGap(Long uploadGap) {
+ this.uploadGap = uploadGap;
+ }
+ public String getIsSchedule() {
+ return isSchedule;
+ }
+ public void setIsSchedule(String isSchedule) {
+ this.isSchedule = isSchedule;
+ }
+ public Long getControlStartTime() {
+ return controlStartTime;
+ }
+ public void setControlStartTime(Long controlStartTime) {
+ this.controlStartTime = controlStartTime;
+ }
+ public Long getPlanCheckTime() {
+ return planCheckTime;
+ }
+ public void setPlanCheckTime(Long planCheckTime) {
+ this.planCheckTime = planCheckTime;
+ }
+ public String getProcessSearchKeyCode() {
+ return processSearchKeyCode;
+ }
+ public void setProcessSearchKeyCode(String processSearchKeyCode) {
+ this.processSearchKeyCode = processSearchKeyCode;
+ }
+ public String getNodeGroupsId() {
+ return nodeGroupsId;
+ }
+ public void setNodeGroupsId(String nodeGroupsId) {
+ this.nodeGroupsId = nodeGroupsId;
+ }
+ public String getNodeIpsId() {
+ return nodeIpsId;
+ }
+ public void setNodeIpsId(String nodeIpsId) {
+ this.nodeIpsId = nodeIpsId;
+ }
+ public Long getViewLevel() {
+ return viewLevel;
+ }
+ public void setViewLevel(Long viewLevel) {
+ this.viewLevel = viewLevel;
+ }
+ public String getNodeIp2() {
+ return nodeIp2;
+ }
+ public void setNodeIp2(String nodeIp2) {
+ this.nodeIp2 = nodeIp2;
+ }
+ public Long getIsSNMP() {
+ return isSNMP;
+ }
+ public void setIsSNMP(Long isSNMP) {
+ this.isSNMP = isSNMP;
+ }
+ public void setLastMergeDetecTime(Long lastMergeDetecTime) {
+ this.lastMergeDetecTime = lastMergeDetecTime;
+ }
+ public Long getLastMergeDetecTime() {
+ return lastMergeDetecTime;
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this);
+ }
+
+
+}
diff --git a/src/com/nis/nmsclient/model/Task1.java b/src/com/nis/nmsclient/model/Task1.java
new file mode 100644
index 0000000..32950fb
--- /dev/null
+++ b/src/com/nis/nmsclient/model/Task1.java
@@ -0,0 +1,49 @@
+package com.nis.nmsclient.model;
+
+/**
+ * 任务实体类:1 文件推送
+ *
+ */
+public class Task1 {
+ /**
+ * 任务ID
+ */
+ private Long taskId;
+ /**
+ * 任务类型:1 文件推送,2 非流文本数据获取,3 流文本数据获取,4 命令执行,5 shell注册
+ */
+ private long taskType;
+ /**
+ * 推送文件参数设置
+ */
+ private String taskParam;
+ /**
+ * 重新执行,原任务ID
+ */
+ private Long oldTaskId;
+
+ public Long getTaskId() {
+ return taskId;
+ }
+ public void setTaskId(Long taskId) {
+ this.taskId = taskId;
+ }
+ public long getTaskType() {
+ return taskType;
+ }
+ public void setTaskType(long taskType) {
+ this.taskType = taskType;
+ }
+ public String getTaskParam() {
+ return taskParam;
+ }
+ public void setTaskParam(String taskParam) {
+ this.taskParam = taskParam;
+ }
+ public Long getOldTaskId() {
+ return oldTaskId;
+ }
+ public void setOldTaskId(Long oldTaskId) {
+ this.oldTaskId = oldTaskId;
+ }
+}
diff --git a/src/com/nis/nmsclient/model/Task4.java b/src/com/nis/nmsclient/model/Task4.java
new file mode 100644
index 0000000..302252c
--- /dev/null
+++ b/src/com/nis/nmsclient/model/Task4.java
@@ -0,0 +1,166 @@
+package com.nis.nmsclient.model;
+
+
+/**
+ * 任务实体类:4 命令执行
+ *
+ */
+public class Task4 {
+ /**
+ * 任务ID
+ */
+ private Long taskId;
+ /**
+ * 任务类型:1 文件推送,2 非流文本数据获取,3 流文本数据获取,4 命令执行,5 shell注册
+ */
+ private long taskType;
+ /**
+ * 命令类型:1 Agent原生支持命令,2 脚本,3 shell命令
+ */
+ private long commandType;
+ /**
+ * 命令名称
+ */
+ private String commandName;
+ /**
+ * 命令参数
+ */
+ private String commandParam;
+ /**
+ * 脚本路径(已无用)
+ */
+ private String scriptPath;
+ /**
+ * 执行状态:4下发任务(40 下发成功,41下发失败),5杀进程(50成功,51失败)、6备份、7更新(覆盖) 、8启动进程
+ */
+ private long state;
+ /**
+ * 执行时间
+ */
+ private Long startTime;
+ /**
+ * 结束时间
+ */
+ private Long endTime;
+ /**
+ * 是否循环任务: 0 非周期, 1 周期,默认是0
+ */
+ private long isLoop;
+ /**
+ * 如果是循环任务,循环周期
+ */
+ private long loopDelay;
+ /**
+ * 任务状态:6撤销执行
+ */
+ private Long missionState;
+ /**
+ * 重新执行,原任务ID
+ */
+ private Long oldTaskId;
+
+ public Long getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(Long taskId) {
+ this.taskId = taskId;
+ }
+
+ public long getTaskType() {
+ return taskType;
+ }
+
+ public void setTaskType(long taskType) {
+ this.taskType = taskType;
+ }
+
+ public long getCommandType() {
+ return commandType;
+ }
+
+ public void setCommandType(long commandType) {
+ this.commandType = commandType;
+ }
+
+ public long getState() {
+ return state;
+ }
+
+ public void setState(long state) {
+ this.state = state;
+ }
+
+ public String getCommandName() {
+ return commandName;
+ }
+
+ public void setCommandName(String commandName) {
+ this.commandName = commandName;
+ }
+
+ public String getCommandParam() {
+ return commandParam;
+ }
+
+ public void setCommandParam(String commandParam) {
+ this.commandParam = commandParam;
+ }
+
+ public String getScriptPath() {
+ return scriptPath;
+ }
+
+ public void setScriptPath(String scriptPath) {
+ this.scriptPath = scriptPath;
+ }
+
+ public Long getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(Long startTime) {
+ this.startTime = startTime;
+ }
+
+ public Long getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(Long endTime) {
+ this.endTime = endTime;
+ }
+
+ public long getIsLoop() {
+ return isLoop;
+ }
+
+ public void setIsLoop(long isLoop) {
+ this.isLoop = isLoop;
+ }
+
+ public long getLoopDelay() {
+ return loopDelay;
+ }
+
+ public void setLoopDelay(long loopDelay) {
+ this.loopDelay = loopDelay;
+ }
+
+ public Long getMissionState() {
+ return missionState;
+ }
+
+ public void setMissionState(Long missionState) {
+ this.missionState = missionState;
+ }
+
+ public Long getOldTaskId() {
+ return oldTaskId;
+ }
+
+ public void setOldTaskId(Long oldTaskId) {
+ this.oldTaskId = oldTaskId;
+ }
+
+}
diff --git a/src/com/nis/nmsclient/model/Task6.java b/src/com/nis/nmsclient/model/Task6.java
new file mode 100644
index 0000000..06ddec7
--- /dev/null
+++ b/src/com/nis/nmsclient/model/Task6.java
@@ -0,0 +1,121 @@
+package com.nis.nmsclient.model;
+
+
+/**
+ * 任务实体类:6 升级
+ *
+ */
+public class Task6 {
+ /**
+ * 任务ID
+ */
+ private Long taskId;
+ /**
+ * 任务类型:1 文件推送,4 命令执行,5 shell注册,6 升级
+ */
+ private long taskType;
+ /**
+ * 命令类型:4 Agent原生支持命令
+ */
+ private long commandType;
+ /**
+ * 命令名称
+ */
+ private String commandName;
+ /**
+ * 命令参数
+ */
+ private String commandParam;
+ /**
+ * 执行状态:4下发任务(40 下发成功,41下发失败),5杀进程(50成功,51失败)、6备份、7更新(覆盖) 、8启动进程
+ */
+ private Long state;
+ /**
+ * 如果是恢复(逆向任务),则为恢复到的版本(恢复到的任务ID)。判断它是否为空,来确定是否逆向任务
+ */
+ private Long version;
+ /**
+ * 升级时间
+ */
+ private Long upgradeTime;
+ /**
+ * 全局权限用户名(未来)
+ */
+ private String username;
+ /**
+ * 全局权限密码(未来 约定加密方式)
+ */
+ private String userpwd;
+ /**
+ * 重新执行,原任务ID
+ */
+ private Long oldTaskId;
+
+ public Long getTaskId() {
+ return taskId;
+ }
+ public void setTaskId(Long taskId) {
+ this.taskId = taskId;
+ }
+ public long getTaskType() {
+ return taskType;
+ }
+ public void setTaskType(long taskType) {
+ this.taskType = taskType;
+ }
+ public long getCommandType() {
+ return commandType;
+ }
+ public void setCommandType(long commandType) {
+ this.commandType = commandType;
+ }
+ public String getCommandName() {
+ return commandName;
+ }
+ public void setCommandName(String commandName) {
+ this.commandName = commandName;
+ }
+ public String getCommandParam() {
+ return commandParam;
+ }
+ public void setCommandParam(String commandParam) {
+ this.commandParam = commandParam;
+ }
+ public Long getState() {
+ return state;
+ }
+ public void setState(Long state) {
+ this.state = state;
+ }
+ public Long getVersion() {
+ return version;
+ }
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+ public Long getUpgradeTime() {
+ return upgradeTime;
+ }
+ public void setUpgradeTime(Long upgradeTime) {
+ this.upgradeTime = upgradeTime;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public String getUserpwd() {
+ return userpwd;
+ }
+ public void setUserpwd(String userpwd) {
+ this.userpwd = userpwd;
+ }
+ public Long getOldTaskId() {
+ return oldTaskId;
+ }
+ public void setOldTaskId(Long oldTaskId) {
+ this.oldTaskId = oldTaskId;
+ }
+
+}