TelnetCommand.java
资源名称:telnet.rar [点击查看]
上传用户:sxqicai
上传日期:2021-04-19
资源大小:4k
文件大小:1k
源码类别:
Telnet服务器
开发平台:
Java
- package telnet;
- import java.util.Timer;
- public class TelnetCommand
- {
- public String commandText; //命令
- public String commandOutput; //输出结果
- public int commandTimeLimit; //最长等待分钟数
- public int redoTimes ; //重做次数
- public String error_msg ;//指令执行错误信息
- public TelnetCommand (String commandText,String commandOutput)
- {
- this(commandText,commandOutput,1,1,"指令执行超时");
- }
- public TelnetCommand (String commandText,String commandOutput,int commandTimeLimit,int redoTimes,
- String error_msg )
- {
- this.commandText=commandText;
- this.commandOutput=commandOutput;
- this.commandTimeLimit=commandTimeLimit;
- this.redoTimes=redoTimes;
- this.error_msg=error_msg;
- }
- public TelnetCommand (String commandText,String commandOutput,int commandTimeLimit)
- {
- this.commandText=commandText;
- this.commandOutput=commandOutput;
- this.commandTimeLimit=commandTimeLimit;
- this.redoTimes=1;
- this.error_msg="指令执行超时";
- }
- public TelnetCommand()
- {
- commandText="";
- commandOutput="";
- commandTimeLimit=1;
- redoTimes=1;
- error_msg="指令执行超时";
- }
- public TelnetCommand (String commandText,String commandOutput,String error_msg )
- {
- this.commandText=commandText;
- this.commandOutput=commandOutput;
- this.commandTimeLimit=1;
- this.redoTimes=1;
- this.error_msg=error_msg;
- }
- }