Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: faeda3677fc43f24b24a47663d51ee62ef26d739 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*******************************************************************************
 * Copyright (c) 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.osgi.framework.console;

/**
	When an object wants to provide a number of commands
	to the console, it should register an object with this
	interface. Some console can then pick this up and execute
	command lines.
        The SERVICE_RANKING registration property can be used to influence the
        order that a CommandProvider gets called.  Specify a value less than
        Integer.MAXVALUE, where higher is more significant.  The default value
        if SERVICE_RANKING is not set is 0.
	<p>
	The interface contains only methods for the help.
	The console should use inspection
	to find the commands. All public commands, starting with
	a '_' and taking a CommandInterpreter as parameter
	will be found. E.g.
	<pre>
		public Object _hello( CommandInterpreter intp ) {
			return "hello " + intp.nextArgument();
		}
	</pre>
*/
public interface CommandProvider {
	public final static String NAME = "org.eclipse.osgi.framework.internal.core.command.CommandProvider";
        
	/**
		Answer a string (may be as many lines as you like) with help
		texts that explain the command.
	*/
	public String getHelp();
	
}


Back to the top