本文整理了Java中org.apache.felix.gogo.commands.Command.<init>()
方法的一些代码示例,展示了Command.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Command.<init>()
方法的具体详情如下:
包路径:org.apache.felix.gogo.commands.Command
类名称:Command
方法名:<init>
暂无
代码示例来源:origin: org.fusesource.fabric.fab/fab-osgi
@Command(name = "stop", scope = "fab", description = "Stops the Fabric Bundle along with all of its transitive dependencies which are not being used by other bundles")
public class StopCommand extends ProcessUnusedBundles {
private static final transient Logger LOG = LoggerFactory.getLogger(StopCommand.class);
@Override
protected void processBundle(Bundle bundle) {
stopBundle(bundle);
}
}
代码示例来源:origin: org.fusesource.fabric.fab/fab-osgi
@Command(name = "update", scope = "module", description = "Update the modules")
public class UpdateCommand extends CommandSupport {
@Override
protected Object doExecute() throws Exception {
Activator.registry.update(session.getConsole());
return null;
}
}
代码示例来源:origin: org.apache.felix.karaf.shell/org.apache.felix.karaf.shell.commands
@Command(scope = "shell", name = "logout", description = "Disconnect shell from current session")
public class LogoutAction extends OsgiCommandSupport {
private final Logger log = LoggerFactory.getLogger(getClass());
protected Object doExecute() throws Exception {
log.info("Disconnecting from current session...");
throw new CloseShellException();
}
}
代码示例来源:origin: io.fabric8/process-fabric
/**
*/
@Command(name = "process-unstall", scope = "fabric", description = "Uninstalls a managed process from this container.")
public class Uninstall extends ContainerProcessControllerSupport {
@Override
protected void doControlCommand(Installation installation) throws Exception {
installation.getController().uninstall();
}
}
代码示例来源:origin: org.fusesource.insight/insight-camel
@Command(scope = "camel", name = "profiler")
public class ProfilerCommand extends BaseCommand {
@Override
public String getStrategy() {
return Activator.PROFILER;
}
}
代码示例来源:origin: org.apache.openejb/openejb-karaf-commands
@Command(scope = "openejb", name = "properties", description = "dump OpenEJB configuration")
public class Properties extends OsgiCommandSupport {
@Override
protected Object doExecute() throws Exception {
final OpenEjbConfiguration config = SystemInstance.get().getComponent(OpenEjbConfiguration.class);
Info2Properties.printConfig(config);
return null;
}
}
代码示例来源:origin: org.fusesource.insight/insight-camel
@Command(scope = "camel", name = "breadcrumbs")
public class BreadcrumbsCommand extends BaseCommand {
@Override
public String getStrategy() {
return Activator.BREADCRUMBS;
}
}
代码示例来源:origin: io.fabric8/process-fabric
/**
*/
@Command(name = "process-stop", scope = "fabric", description = "Stops a managed process")
public class Stop extends ContainerProcessControllerSupport {
@Override
protected void doControlCommand(Installation installation) throws Exception {
installation.getController().stop();
}
}
代码示例来源:origin: com.redhat.rhevm.api/rhevm-api-cli-actions
/**
* Displays the status of an Action
*/
@Command(scope = "actions", name = "monitor", description = "Report status of an asynchronous action.")
public class ActionsMonitorCommand extends AbstractActionsCommand {
protected Object doExecute() throws Exception {
display(client.get(url, Action.class));
return null;
}
}
代码示例来源:origin: org.fusesource.fabric/process-manager
/**
*/
@Command(name = "unstall", scope = "process", description = "Uninstalls a managed process from this container.")
public class Uninstall extends ProcessControlCommandSupport {
@Override
protected void doControlCommand(Installation installation) throws Exception {
installation.getController().uninstall();
}
}
代码示例来源:origin: org.fusesource.fabric/process-manager
/**
*/
@Command(name = "kill", scope = "process", description = "Kills a managed process")
public class Kill extends ProcessControlCommandSupport {
@Override
protected void doControlCommand(Installation installation) throws Exception {
installation.getController().kill();
}
}
代码示例来源:origin: org.fusesource.fabric/process-manager
/**
*/
@Command(name = "restart", scope = "process", description = "Restarts a managed process")
public class Restart extends ProcessControlCommandSupport {
@Override
protected void doControlCommand(Installation installation) throws Exception {
installation.getController().restart();
}
}
代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.obr
@Command(scope = "obr", name = "addUrl", description = "Adds a list of repository URLs to the OBR service.")
public class AddUrlCommand extends ObrCommandSupport {
@Argument(index = 0, name = "urls", description = "Repository URLs to add to the OBR service separated by whitespaces", required = true, multiValued = true)
List<String> urls;
protected void doExecute(RepositoryAdmin admin) throws Exception {
for (String url : urls) {
admin.addRepository(url);
}
persistRepositoryList(admin);
}
}
代码示例来源:origin: io.fabric8.patch/patch-commands
@Command(scope = "patch", name = "list", description = "Display known patches")
public class ListAction extends PatchActionSupport {
@Option(name = "--bundles", description = "Display the list of bundles for each patch")
boolean bundles;
ListAction(Service service) {
super(service);
}
@Override
protected void doExecute(Service service) throws Exception {
display(service.getPatches(), bundles);
}
}
代码示例来源:origin: org.apache.felix.karaf.shell/org.apache.felix.karaf.shell.obr
@Command(scope = "obr", name = "addUrl", description = "Adds a list of repository URLs to the OBR service.")
public class AddUrlCommand extends ObrCommandSupport {
@Argument(index = 0, name = "urls", description = "Repository URLs to add to the OBR service separated by whitespaces", required = true, multiValued = true)
List<String> urls;
protected void doExecute(RepositoryAdmin admin) throws Exception {
for (String url : urls) {
admin.addRepository(url);
}
}
}
代码示例来源:origin: org.apache.karaf.admin/org.apache.karaf.admin.command
@Command(scope = "admin", name = "status", description = "Check the current status of an instance.")
public class StatusCommand extends AdminCommandSupport {
@Argument(index = 0, name = "name", description = "The name of the instance", required = true, multiValued = false)
private String name = null;
protected Object doExecute() throws Exception {
System.out.println(getExistingInstance(name).getState());
return null;
}
}
代码示例来源:origin: com.redhat.rhevm.api/rhevm-api-cli-vms
/**
* Removes a VM
*/
@Command(scope = "vms", name = "remove", description = "Removes a Virtual Machine.")
public class VmsRemoveCommand extends AbstractRemoveCommand {
@Argument(index = 0, name = "name", description = "The name of the VM", required = true, multiValued = false)
protected String name;
protected Object doExecute() throws Exception {
doRemove(client.getCollection("vms", VMs.class).getVMs(), VM.class, name);
return null;
}
}
代码示例来源:origin: org.fusesource.patch/patch-commands
@Command(scope = "patch", name = "list", description = "Display known patches")
public class List extends PatchCommandSupport {
@Option(name = "--bundles", description = "Display the list of bundles for each patch")
boolean bundles;
@Override
protected void doExecute(Service service) throws Exception {
display(service.getPatches(), bundles);
}
}
代码示例来源:origin: com.redhat.rhevm.api/rhevm-api-cli-templates
/**
* Update a Template
*/
@Command(scope = "templates", name = "update", description = "Update Virtual Machine Template state")
public class TemplatesUpdateCommand extends AbstractUpdateCommand<Template> {
@Argument(index = 0, name = "name", description = "The name of the template", required = true, multiValued = false)
protected String name;
protected Object doExecute() throws Exception {
doUpdate(client.getCollection("templates", Templates.class).getTemplates(), Template.class, "template", name);
return null;
}
}
代码示例来源:origin: org.apache.felix.karaf.shell/org.apache.felix.karaf.shell.commands
@Command(scope = "shell", name = "printf", description = "Format and print arguments")
public class PrintfAction extends OsgiCommandSupport {
@Argument(index = 0, name = "format", description = "The format pattern to use", required = true, multiValued = false)
private String format;
@Argument(index = 1, name = "arguments", description = "The arguments for the given format pattern", required = true, multiValued = true)
private Collection<Object> arguments = null;
protected Object doExecute() throws Exception {
System.out.printf(format, arguments.toArray());
return null;
}
}
内容来源于网络,如有侵权,请联系作者删除!