public class KarafConsole
extends org.apache.karaf.itests.KarafTestSupport
Note: This class is needed to expose the protected methods provided by KarafTestSupport. Since we already extend from our own base class, out test classes cannot
extend from this one to access its protected methods.
| Constructor and Description |
|---|
KarafConsole(org.osgi.framework.BundleContext bundleContext,
org.apache.karaf.features.FeaturesService featuresService,
org.apache.karaf.shell.api.console.SessionFactory sessionFactory)
Karaf console constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
runCommand(String command)
Runs a shell command and returns output as a String.
|
String |
runCommand(String command,
long timeout,
Principal... principals)
Runs a shell command and returns output as a String.
|
String |
runCommand(String command,
Principal... principals)
Runs a shell command and returns output as a String.
|
assertBundleInstalled, assertBundleNotInstalled, assertContains, assertContainsNot, assertFeatureInstalled, assertFeatureInstalled, assertFeatureNotInstalled, assertFeatureNotInstalled, assertFeaturesInstalled, close, config, executeCommand, executeCommand, findBundleByName, getAvailablePort, getConfigFile, getJMXConnector, getJMXConnector, getJmxServiceUrl, getOsgiService, getOsgiService, getOsgiService, getSshPort, installAndAssertFeature, installAssertAndUninstallFeature, installAssertAndUninstallFeatures, probeConfiguration, uninstallNewFeatures, waitBundleState, waitForServicepublic KarafConsole(org.osgi.framework.BundleContext bundleContext,
org.apache.karaf.features.FeaturesService featuresService,
org.apache.karaf.shell.api.console.SessionFactory sessionFactory)
bundleContext - bundle context to use when using the console. Cannot be null.public String runCommand(String command, long timeout, Principal... principals)
command - command to execute. Cannot be null.timeout - command timeout in millisecondsprincipals - principals (e.g. RolePrincipal objects) to run the command under (optional)null.public String runCommand(String command, Principal... principals)
command - command to execute. Cannot be null.principals - principals (e.g. RolePrincipal objects) to run the command under (optional)null.public String runCommand(String command)
command - command to execute. Cannot be null.null.This work is licensed under a Creative Commons Attribution 4.0 International License.