1700481751
1700481752
public final static String K_PARAM=“k”;
1700481753
1700481754
//参数g
1700481755
1700481756
public final static String G_PARAM=“g”;
1700481757
1700481758
}
1700481759
1700481760
与前面一样的功能,定义选项名称。接下来是三个实现类,都非常简单,如代码清单34-15所示。
1700481761
1700481762
代码清单34-15 df命令的具体实现类
1700481763
1700481764
public class DF extends AbstractDF{
1700481765
1700481766
//定义一下自己能处理什么参数
1700481767
1700481768
protected String getOperateParam(){
1700481769
1700481770
return super.DEFAULT_PARAM;
1700481771
1700481772
}
1700481773
1700481774
//命令处理
1700481775
1700481776
protected String echo(CommandVO vo){
1700481777
1700481778
return DiskManager.df();
1700481779
1700481780
}
1700481781
1700481782
}
1700481783
1700481784
public class DF_K extends AbstractDF{
1700481785
1700481786
//定义一下自己能处理什么参数
1700481787
1700481788
protected String getOperateParam(){
1700481789
1700481790
return super.K_PARAM;
1700481791
1700481792
}
1700481793
1700481794
//命令处理
1700481795
1700481796
protected String echo(CommandVO vo){
1700481797
1700481798
return DiskManager.df_k();
1700481799
1700481800
}
[
上一页 ]
[ :1.700481751e+09 ]
[
下一页 ]