本文整理了Java中org.apache.karaf.shell.api.action.Completion.<init>()
方法的一些代码示例,展示了Completion.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Completion.<init>()
方法的具体详情如下:
包路径:org.apache.karaf.shell.api.action.Completion
类名称:Completion
方法名:<init>
暂无
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
public abstract class AbstractRouteCommand extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "context", description = "The Camel context name.", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String context;
@Argument(index = 1, name = "route", description = "The Camel route ID or a wildcard expression", required = true, multiValued = false)
@Completion(RouteCompleter.class)
String route;
}
代码示例来源:origin: apache/karaf
@Command(scope = "instance", name = "status", description = "Check the current status of an instance.")
@Service
public class StatusCommand extends InstanceCommandSupport {
@Argument(index = 0, name = "name", description = "The name of the instance", required = true, multiValued = false)
@Completion(InstanceCompleter.class)
private String name;
protected Object doExecute() throws Exception {
Instance instance = getExistingInstance(name);
System.out.println(instance.getState());
return null;
}
}
代码示例来源:origin: apache/karaf
/**
* For commands that need a connection factory and authentication information
*/
public abstract class JmsConnectionCommandSupport extends JmsCommandSupport {
@Argument(index = 0, name = "connectionFactory", description = "The JMS connection factory name", required = true, multiValued = false)
@Completion(ConnectionFactoriesNameCompleter.class)
String connectionFactory;
@Option(name = "-u", aliases = { "--username" }, description = "Username to connect to the JMS broker", required = false, multiValued = false)
String username = "karaf";
@Option(name = "-p", aliases = { "--password" }, description = "Password to connect to the JMS broker", required = false, multiValued = false)
String password = "karaf";
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "context-stop", description = "Stop a Camel context. It becomes unavailable and can not be started again.")
@Service
public class ContextStop extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "context", description = "The name of the Camel context.", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String context;
@Override
public Object execute() throws Exception {
ContextStopCommand command = new ContextStopCommand(context);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "route-list", description = "List Camel routes.")
@Service
public class RouteList extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "name", description = "The Camel context name where to look for the route", required = false, multiValued = false)
@Completion(CamelContextCompleter.class)
String name;
public Object execute() throws Exception {
RouteListCommand command = new RouteListCommand(name);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "context-resume", description = "Resumes a Camel context.")
@Service
public class ContextResume extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "context", description = "The name of the Camel context.", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String context;
@Override
public Object execute() throws Exception {
ContextResumeCommand command = new ContextResumeCommand(context);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: apache/karaf
@Command(scope = "jms", name = "delete", description = "Delete a JMS connection factory")
@Service
public class DeleteCommand extends JmsCommandSupport {
@Argument(index = 0, name = "name", description = "The JMS connection factory name", required = true, multiValued = false)
@Completion(ConnectionFactoriesFileNameCompleter.class)
String name;
@Override
public Object execute() throws Exception {
getJmsService().delete(name);
return null;
}
}
代码示例来源:origin: apache/karaf
@Command(scope = "jdbc", name = "ds-delete", description = "Delete a JDBC datasource")
@Service
public class DeleteCommand extends JdbcCommandSupport {
@Argument(index = 0, name = "name", description = "The JDBC datasource name (the one used at creation time)", required = true, multiValued = false)
@Completion(DataSourcesNameCompleter.class)
String name;
@Override
public Object execute() throws Exception {
this.getJdbcService().delete(name);
return null;
}
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "rest-api-doc", description = "List the Camel REST services API documentation (requires camel-swagger-java on classpath)")
@Service
public class RestApiDoc extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "name", description = "The Camel context name where to look for the REST services", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String name;
public Object execute() throws Exception {
RestApiDocCommand command = new RestApiDocCommand(name);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: org.apache.karaf.instance/org.apache.karaf.instance.core
@Command(scope = "instance", name = "status", description = "Check the current status of an instance.")
@Service
public class StatusCommand extends InstanceCommandSupport {
@Argument(index = 0, name = "name", description = "The name of the instance", required = true, multiValued = false)
@Completion(InstanceCompleter.class)
private String name;
protected Object doExecute() throws Exception {
Instance instance = getExistingInstance(name);
System.out.println(instance.getState());
return null;
}
}
代码示例来源:origin: org.apache.karaf.jdbc/org.apache.karaf.jdbc.core
@Command(scope = "jdbc", name = "ds-delete", description = "Delete a JDBC datasource")
@Service
public class DeleteCommand extends JdbcCommandSupport {
@Argument(index = 0, name = "name", description = "The JDBC datasource name (the one used at creation time)", required = true, multiValued = false)
@Completion(DataSourcesNameCompleter.class)
String name;
@Override
public Object execute() throws Exception {
this.getJdbcService().delete(name);
return null;
}
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "rest-show", description = "Display the Camel REST definition in XML")
@Service
public class RestShow extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "name", description = "The name of the Camel context", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String name;
public Object execute() throws Exception {
RestShowCommand command = new RestShowCommand(name);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "context-start", description = "Start a Camel context.")
@Service
public class ContextStart extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "context", description = "The name of the Camel context.", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String context;
@Override
public Object execute() throws Exception {
ContextStartCommand command = new ContextStartCommand(context);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: apache/karaf-cellar
@Command(scope = "cluster", name = "consumer-status", description = "Status of a cluster event consumer")
@Service
public class ConsumerStatusCommand extends ConsumerSupport {
@Argument(index = 0, name = "node", description = "The node(s) ID or alias", required = false, multiValued = true)
@Completion(AllNodeCompleter.class)
List<String> nodes;
@Override
protected Object doExecute() throws Exception {
return doExecute(nodes, null);
}
}
代码示例来源:origin: apache/karaf-cellar
@Command(scope = "cluster", name = "producer-status", description = "Status of a cluster event producer")
@Service
public class ProducerStatusCommand extends ProducerSupport {
@Argument(index = 0, name = "node", description = "The node(s) ID or alias", required = false, multiValued = true)
@Completion(AllNodeCompleter.class)
List<String> nodes;
@Override
protected Object doExecute() throws Exception {
return doExecute(nodes, null);
}
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "route-reset-stats", description = "Reset route performance stats from a CamelContext")
@Service
public class RouteResetStats extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "context", description = "The name of the Camel context.", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String context;
@Override
public Object execute() throws Exception {
RouteResetStatsCommand command = new RouteResetStatsCommand(context);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: org.apache.camel.karaf/camel-karaf-commands
@Command(scope = "camel", name = "context-suspend", description = "Suspends a Camel context.")
@Service
public class ContextSuspend extends CamelControllerImpl implements Action {
@Argument(index = 0, name = "context", description = "The name of the Camel context.", required = true, multiValued = false)
@Completion(CamelContextCompleter.class)
String context;
@Override
public Object execute() throws Exception {
ContextSuspendCommand command = new ContextSuspendCommand(context);
return command.execute(this, System.out, System.err);
}
}
代码示例来源:origin: apache/karaf
@Command(scope = "instance", name = "rmi-server-port-change", description = "Changes the RMI server port (used by management layer) of an existing instance.")
@Service
public class ChangeRmiServerPortCommand extends InstanceCommandSupport {
@Argument(index = 0, name = "name", description = "The name of the container instance", required = true, multiValued = false)
@Completion(InstanceCompleter.class)
private String instance = null;
@Argument(index = 1, name = "port", description = "The new RMI server port to set", required = true, multiValued = false)
private int port = 0;
protected Object doExecute() throws Exception {
getExistingInstance(instance).changeRmiServerPort(port);
return null;
}
}
代码示例来源:origin: apache/karaf
@Command(scope = "instance", name = "ssh-port-change", description = "Changes the secure shell port of an existing container instance.")
@Service
public class ChangeSshPortCommand extends InstanceCommandSupport {
@Argument(index = 0, name = "name", description="The name of the container instance", required = true, multiValued = false)
@Completion(InstanceCompleter.class)
private String instance = null;
@Argument(index = 1, name = "port", description = "The new secure shell port to set", required = true, multiValued = false)
private int port = 0;
protected Object doExecute() throws Exception {
getExistingInstance(instance).changeSshPort(port);
return null;
}
}
代码示例来源:origin: apache/karaf
@Command(scope = "instance", name = "opts-change", description = "Changes the Java options of an existing container instance.")
@Service
public class ChangeOptsCommand extends InstanceCommandSupport {
@Argument(index = 0, name = "name", description="The name of the container instance", required = true, multiValued = false)
@Completion(InstanceCompleter.class)
private String instance = null;
@Argument(index = 1, name = "javaOpts", description = "The new Java options to set", required = true, multiValued = false)
private String javaOpts;
protected Object doExecute() throws Exception {
getExistingInstance(instance).changeJavaOpts(javaOpts);
return null;
}
}
内容来源于网络,如有侵权,请联系作者删除!