osgi在Actiivator中施用command

osgi在Actiivator中使用commandpublic class SampleActivator implements BundleActivator, CommandProvid

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");}}