读书人

osgi在Actiivator中施用command

发布时间: 2012-12-28 10:29:05 作者: rapoo

osgi在Actiivator中使用command

public class SampleActivator implements BundleActivator, CommandProvider {

public String getHelp() {//console提示

StringBuffer buffer = new StringBuffer();

buffer.append("\t dna_list - list all samples\n");//提球我们要加一个dna_list命令

return buffer.toString();

}


public void _dna_list(CommandInterpreter intp) {// "_"加命令名格成方法命,自动被osgi识别sysout("this is my command");}}

读书人网 >操作系统

热点推荐