public class FrameworkCommandProvider extends Object implements CommandProvider, SynchronousBundleListener
Constructor and Description |
---|
FrameworkCommandProvider(Framework framework)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
_b(CommandInterpreter intp)
Handle the bundle command's abbreviation.
|
void |
_bundle(CommandInterpreter intp)
Handle the bundle command.
|
void |
_bundles(CommandInterpreter intp)
Handle the bundles command.
|
void |
_classSpaces(CommandInterpreter intp) |
void |
_close(CommandInterpreter intp)
Handle the close command.
|
void |
_exec(CommandInterpreter intp)
Executes the given system command in a separate system process
and waits for it to finish.
|
void |
_exit(CommandInterpreter intp)
Handle the exit command.
|
void |
_fork(CommandInterpreter intp)
Executes the given system command in a separate system process.
|
void |
_gc(CommandInterpreter intp)
Handle the gc command.
|
void |
_getPackages(CommandInterpreter intp) |
void |
_getprop(CommandInterpreter ci) |
void |
_h(CommandInterpreter intp)
Handle the headers command's abbreviation.
|
void |
_headers(CommandInterpreter intp)
Handle the headers command.
|
Object |
_help(CommandInterpreter intp)
Handles the help command
|
void |
_i(CommandInterpreter intp)
Handle the install command's abbreviation.
|
void |
_init(CommandInterpreter intp)
Handle the init command.
|
void |
_install(CommandInterpreter intp)
Handle the install command.
|
void |
_launch(CommandInterpreter intp)
Handle the launch command.
|
void |
_p(CommandInterpreter intp)
Handle the packages command's abbreviation.
|
void |
_packages(CommandInterpreter intp)
Handle the packages command.
|
void |
_pr(CommandInterpreter intp)
Handles the props command's abbreviation.
|
void |
_profilelog(CommandInterpreter intp)
Handles the profilelog command.
|
void |
_props(CommandInterpreter intp)
Handles the _props command.
|
void |
_r(CommandInterpreter intp)
Handle the refresh command's abbreviation.
|
void |
_refresh(CommandInterpreter intp)
Handle the refresh command.
|
void |
_requiredBundles(CommandInterpreter intp) |
void |
_s(CommandInterpreter intp)
Handle the status command's abbreviation.
|
void |
_se(CommandInterpreter intp)
Handle the services command's abbreviation.
|
void |
_services(CommandInterpreter intp)
Handle the services command.
|
void |
_setbsl(CommandInterpreter intp)
Handles the setbsl (set bundle startlevel) command.
|
void |
_setfwsl(CommandInterpreter intp)
Handles the setfwsl (set framework startlevel) command.
|
void |
_setibsl(CommandInterpreter intp)
Handles the setibsl (set initial bundle startlevel) command.
|
void |
_setp(CommandInterpreter intp)
Handles the setprop command's abbreviation.
|
void |
_setprop(CommandInterpreter intp)
Handles the setprop command.
|
void |
_shutdown(CommandInterpreter intp)
Handle the shutdown command.
|
void |
_sl(CommandInterpreter intp)
Handles the sl (startlevel) command.
|
void |
_ss(CommandInterpreter intp)
Prints the short version of the status.
|
void |
_sta(CommandInterpreter intp)
Handle the start command's abbreviation.
|
void |
_start(CommandInterpreter intp)
Handle the start command.
|
void |
_status(CommandInterpreter intp)
Handle the status command.
|
void |
_sto(CommandInterpreter intp)
Handle the stop command's abbreviation.
|
void |
_stop(CommandInterpreter intp)
Handle the stop command.
|
void |
_t(CommandInterpreter intp)
Handles the threads command abbreviation.
|
void |
_threads(CommandInterpreter intp)
Prints the information about the currently running threads
in the embedded system.
|
void |
_un(CommandInterpreter intp)
Handle the uninstall command's abbreviation.
|
void |
_uninstall(CommandInterpreter intp)
Handle the uninstall command.
|
void |
_up(CommandInterpreter intp)
Handle the update command's abbreviation.
|
void |
_update(CommandInterpreter intp)
Handle the update command.
|
void |
bundleChanged(BundleEvent event)
This is used to track lazily activated bundles.
|
protected AbstractBundle |
getBundleFromToken(CommandInterpreter intp,
String token,
boolean error)
Given a number or a token representing a bundle symbolic name or bundle location,
retrieve the Bundle object with that id.
|
String |
getHelp()
Answer a string (may be as many lines as you like) with help
texts that explain the command.
|
protected int |
getStartLevelFromToken(CommandInterpreter intp,
String value)
Given a string containing a startlevel value, validate it and convert it to an int
|
protected String |
getStateName(Bundle bundle)
Given a bundle, return the string describing that bundle's state.
|
protected ThreadGroup[] |
getThreadGroups()
Answers all thread groups in the system.
|
protected ThreadGroup |
getTopThreadGroup()
Answers the top level group of the current thread.
|
protected boolean |
isStartLevelSvcPresent(CommandInterpreter intp)
Checks for the presence of the StartLevel Service.
|
String |
simpleClassName(Object o)
Returns the simple class name of an object.
|
public FrameworkCommandProvider(Framework framework)
framework
- The current instance of the frameworkpublic String getHelp()
getHelp
in interface CommandProvider
public void _exit(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _launch(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _shutdown(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _sta(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _start(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _sto(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _stop(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _i(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _install(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _up(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _update(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _un(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _uninstall(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _s(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _status(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _se(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _services(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _p(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _packages(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _bundles(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _b(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _bundle(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _gc(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _init(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _close(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _r(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _refresh(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _exec(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _fork(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _h(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _headers(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _pr(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _props(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _setp(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _setprop(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _ss(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _t(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _threads(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command
and it's arguments.Exception
public void _sl(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _setfwsl(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _setbsl(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _setibsl(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _requiredBundles(CommandInterpreter intp)
public void _classSpaces(CommandInterpreter intp)
public void _profilelog(CommandInterpreter intp) throws Exception
intp
- A CommandInterpreter object containing the command and it's arguments.Exception
public void _getPackages(CommandInterpreter intp)
public Object _help(CommandInterpreter intp)
intp
- protected boolean isStartLevelSvcPresent(CommandInterpreter intp)
intp
- The CommandInterpreter object to be used to write to the consoleprotected AbstractBundle getBundleFromToken(CommandInterpreter intp, String token, boolean error)
intp
- The CommandInterpretertoken
- A string containing a potential bundle iterror
- A boolean indicating whether or not to output a messageprotected int getStartLevelFromToken(CommandInterpreter intp, String value)
intp
- A CommandInterpreter object used for printing out error messagesvalue
- A string containing a potential startlevelprotected String getStateName(Bundle bundle)
bundle
- A bundle to return the state ofprotected ThreadGroup[] getThreadGroups()
protected ThreadGroup getTopThreadGroup()
It is the 'system' or 'main' thread group under which all 'user' thread groups are allocated.
public String simpleClassName(Object o)
o
- The object for which a class name is requestedpublic void _getprop(CommandInterpreter ci) throws Exception
Exception
public void bundleChanged(BundleEvent event)
bundleChanged
in interface BundleListener
event
- The BundleEvent
.Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.