- Display help for the specified command
There is a method for each command which is named '_'+method. The methods are
invoked by a CommandInterpreter's execute method.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FrameworkCommandProvider
public FrameworkCommandProvider(Framework framework)
- Constructor.
initialize must be called after creating this object.
- Parameters:
framework - The current instance of the framework
getHelp
public String getHelp()
- Answer a string (may be as many lines as you like) with help
texts that explain the command. This getHelp() method uses the
ConsoleMsg class to obtain the correct NLS data to display to the user.
- Specified by:
getHelp in interface CommandProvider
- Returns:
- The help string
_exit
public void _exit(CommandInterpreter intp)
throws Exception
- Handle the exit command. Exit immediately (System.exit)
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_launch
public void _launch(CommandInterpreter intp)
throws Exception
- Handle the launch command. Start the OSGi framework.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_shutdown
public void _shutdown(CommandInterpreter intp)
throws Exception
- Handle the shutdown command. Shutdown the OSGi framework.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_sta
public void _sta(CommandInterpreter intp)
throws Exception
- Handle the start command's abbreviation. Invoke _start()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_start
public void _start(CommandInterpreter intp)
throws Exception
- Handle the start command. Start the specified bundle(s).
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_sto
public void _sto(CommandInterpreter intp)
throws Exception
- Handle the stop command's abbreviation. Invoke _stop()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_stop
public void _stop(CommandInterpreter intp)
throws Exception
- Handle the stop command. Stop the specified bundle(s).
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_i
public void _i(CommandInterpreter intp)
throws Exception
- Handle the install command's abbreviation. Invoke _install()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_install
public void _install(CommandInterpreter intp)
throws Exception
- Handle the install command. Install and optionally start bundle from the given URL\r\n"
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_up
public void _up(CommandInterpreter intp)
throws Exception
- Handle the update command's abbreviation. Invoke _update()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_update
public void _update(CommandInterpreter intp)
throws Exception
- Handle the update command. Update the specified bundle(s).
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_un
public void _un(CommandInterpreter intp)
throws Exception
- Handle the uninstall command's abbreviation. Invoke _uninstall()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_uninstall
public void _uninstall(CommandInterpreter intp)
throws Exception
- Handle the uninstall command. Uninstall the specified bundle(s).
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_s
public void _s(CommandInterpreter intp)
throws Exception
- Handle the status command's abbreviation. Invoke _status()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_status
public void _status(CommandInterpreter intp)
throws Exception
- Handle the status command. Display installed bundles and registered services.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_se
public void _se(CommandInterpreter intp)
throws Exception
- Handle the services command's abbreviation. Invoke _services()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_services
public void _services(CommandInterpreter intp)
throws Exception
- Handle the services command. Display registered service details.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_p
public void _p(CommandInterpreter intp)
throws Exception
- Handle the packages command's abbreviation. Invoke _packages()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_packages
public void _packages(CommandInterpreter intp)
throws Exception
- Handle the packages command. Display imported/exported package details.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_bundles
public void _bundles(CommandInterpreter intp)
throws Exception
- Handle the bundles command. Display details for all installed bundles.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_b
public void _b(CommandInterpreter intp)
throws Exception
- Handle the bundle command's abbreviation. Invoke _bundle()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_bundle
public void _bundle(CommandInterpreter intp)
throws Exception
- Handle the bundle command. Display details for the specified bundle(s).
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_gc
public void _gc(CommandInterpreter intp)
throws Exception
- Handle the gc command. Perform a garbage collection.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_init
public void _init(CommandInterpreter intp)
throws Exception
- Handle the init command. Uninstall all bundles.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_close
public void _close(CommandInterpreter intp)
throws Exception
- Handle the close command. Shutdown and exit.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_r
public void _r(CommandInterpreter intp)
throws Exception
- Handle the refresh command's abbreviation. Invoke _refresh()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_refresh
public void _refresh(CommandInterpreter intp)
throws Exception
- Handle the refresh command. Refresh the packages of the specified bundles.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_exec
public void _exec(CommandInterpreter intp)
throws Exception
- Executes the given system command in a separate system process
and waits for it to finish.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_fork
public void _fork(CommandInterpreter intp)
throws Exception
- Executes the given system command in a separate system process. It does
not wait for a result.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_h
public void _h(CommandInterpreter intp)
throws Exception
- Handle the headers command's abbreviation. Invoke _headers()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_headers
public void _headers(CommandInterpreter intp)
throws Exception
- Handle the headers command. Display headers for the specified bundle(s).
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_pr
public void _pr(CommandInterpreter intp)
throws Exception
- Handles the props command's abbreviation. Invokes _props()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_props
public void _props(CommandInterpreter intp)
throws Exception
- Handles the _props command. Prints the system properties sorted.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_setp
public void _setp(CommandInterpreter intp)
throws Exception
- Handles the setprop command's abbreviation. Invokes _setprop()
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_setprop
public void _setprop(CommandInterpreter intp)
throws Exception
- Handles the setprop command. Sets the CDS property in the given argument.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_ss
public void _ss(CommandInterpreter intp)
throws Exception
- Prints the short version of the status.
For the long version use "status".
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_t
public void _t(CommandInterpreter intp)
throws Exception
- Handles the threads command abbreviation. Invokes _threads().
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_threads
public void _threads(CommandInterpreter intp)
throws Exception
- Prints the information about the currently running threads
in the embedded system.
- Parameters:
intp - A CommandInterpreter object containing the command
and it's arguments.
- Throws:
Exception
_sl
public void _sl(CommandInterpreter intp)
throws Exception
- Handles the sl (startlevel) command.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_setfwsl
public void _setfwsl(CommandInterpreter intp)
throws Exception
- Handles the setfwsl (set framework startlevel) command.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_setbsl
public void _setbsl(CommandInterpreter intp)
throws Exception
- Handles the setbsl (set bundle startlevel) command.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_setibsl
public void _setibsl(CommandInterpreter intp)
throws Exception
- Handles the setibsl (set initial bundle startlevel) command.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_requiredBundles
public void _requiredBundles(CommandInterpreter intp)
_classSpaces
public void _classSpaces(CommandInterpreter intp)
_profilelog
public void _profilelog(CommandInterpreter intp)
throws Exception
- Handles the profilelog command.
- Parameters:
intp - A CommandInterpreter object containing the command and it's arguments.
- Throws:
Exception
_getPackages
public void _getPackages(CommandInterpreter intp)
_help
public Object _help(CommandInterpreter intp)
- Handles the help command
- Parameters:
intp -
- Returns:
- description for a particular command or false if there is no command with the specified name
isStartLevelSvcPresent
protected boolean isStartLevelSvcPresent(CommandInterpreter intp)
- Checks for the presence of the StartLevel Service. Outputs a message if it is not present.
- Parameters:
intp - The CommandInterpreter object to be used to write to the console
- Returns:
- true or false if service is present or not
getBundleFromToken
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. The bundle symbolic name token is parsed as
symbolicname[@version]
- Parameters:
intp - The CommandInterpretertoken - A string containing a potential bundle iterror - A boolean indicating whether or not to output a message
- Returns:
- The requested Bundle object
getStartLevelFromToken
protected int getStartLevelFromToken(CommandInterpreter intp,
String value)
- Given a string containing a startlevel value, validate it and convert it to an int
- Parameters:
intp - A CommandInterpreter object used for printing out error messagesvalue - A string containing a potential startlevel
- Returns:
- The start level or an int <0 if it was invalid
getStateName
protected String getStateName(Bundle bundle)
- Given a bundle, return the string describing that bundle's state.
- Parameters:
bundle - A bundle to return the state of
- Returns:
- A String describing the state
getThreadGroups
protected ThreadGroup[] getThreadGroups()
- Answers all thread groups in the system.
- Returns:
- An array of all thread groups.
getTopThreadGroup
protected ThreadGroup getTopThreadGroup()
- Answers the top level group of the current thread.
It is the 'system' or 'main' thread group under
which all 'user' thread groups are allocated.
- Returns:
- The parent of all user thread groups.
simpleClassName
public String simpleClassName(Object o)
- Returns the simple class name of an object.
- Parameters:
o - The object for which a class name is requested
- Returns:
- The simple class name.
_getprop
public void _getprop(CommandInterpreter ci)
throws Exception
- Throws:
Exception
bundleChanged
public void bundleChanged(BundleEvent event)
- This is used to track lazily activated bundles.
- Specified by:
bundleChanged in interface BundleListener
- Parameters:
event - The BundleEvent.
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.