|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.osgi.framework.internal.core.FrameworkConsole
public class FrameworkConsole
This class starts OSGi with a console for development use. FrameworkConsole provides a printStackTrace method to print Exceptions and their nested Exceptions.
Field Summary | |
---|---|
protected java.lang.String[] |
args
The command line arguments passed at launch time |
protected BundleContext |
context
The current bundle context |
protected ServiceTracker |
cptracker
A tracker containing the service object of all registered command providers |
protected boolean |
disconnect
|
protected java.io.BufferedReader |
in
The stream to receive commands on |
protected org.eclipse.osgi.framework.internal.core.OSGi |
osgi
The current osgi instance |
protected CommandProvider |
osgicp
The OSGi Command Provider |
protected java.io.PrintWriter |
out
The stream to write command results to |
protected int |
port
|
protected java.net.Socket |
s
|
protected org.eclipse.osgi.framework.internal.core.FrameworkConsole.ConsoleSocketGetter |
scsg
|
protected boolean |
useSocketStream
set to true if accepting commands from port |
Constructor Summary | |
---|---|
FrameworkConsole(org.eclipse.osgi.framework.internal.core.OSGi osgi,
int port,
java.lang.String[] args)
Constructor for FrameworkConsole. |
|
FrameworkConsole(org.eclipse.osgi.framework.internal.core.OSGi osgi,
java.lang.String[] args)
Constructor for FrameworkConsole. |
Method Summary | |
---|---|
protected void |
console()
Command Line Interface for OSGi. |
void |
console(java.lang.String[] args)
Command Line Interface for OSGi. |
void |
disconnect()
Disconnects from console if useSocketStream is set to true. |
protected void |
docommand(java.lang.String cmdline)
Process the args on the command line. |
java.lang.String |
getInput()
Reads a string from standard input until user hits the Enter key. |
java.io.BufferedReader |
getReader()
Return the current input BufferedReader |
java.lang.Object[] |
getServices()
Return an array of service objects for all services being tracked by this ServiceTracker object. |
boolean |
getUseSocketStream()
Return if the SocketSteam (telnet to the console) is being used |
java.io.PrintWriter |
getWriter()
Return the current output PrintWriter |
void |
run()
Begin doing the active part of the class' code. |
void |
shutdown()
Stops the console so the thread can be GC'ed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.BufferedReader in
protected java.io.PrintWriter out
protected final BundleContext context
protected final org.eclipse.osgi.framework.internal.core.OSGi osgi
protected final java.lang.String[] args
protected final CommandProvider osgicp
protected final ServiceTracker cptracker
protected final boolean useSocketStream
protected boolean disconnect
protected final int port
protected org.eclipse.osgi.framework.internal.core.FrameworkConsole.ConsoleSocketGetter scsg
protected java.net.Socket s
Constructor Detail |
---|
public FrameworkConsole(org.eclipse.osgi.framework.internal.core.OSGi osgi, java.lang.String[] args)
osgi
- - an instance of an osgi frameworkargs
- - any arguments passed on the command line when Launcher is started.public FrameworkConsole(org.eclipse.osgi.framework.internal.core.OSGi osgi, int port, java.lang.String[] args)
osgi
- - an instance of an osgi frameworkargs
- - any arguments passed on the command line when Launcher is started.Method Detail |
---|
public java.io.PrintWriter getWriter()
public java.io.BufferedReader getReader()
public boolean getUseSocketStream()
public void run()
run
in interface java.lang.Runnable
public void console(java.lang.String[] args) throws java.io.IOException
args
- Initial set of commands to execute.
java.io.IOException
protected void console() throws java.io.IOException
java.io.IOException
protected void docommand(java.lang.String cmdline)
cmdline
- a string containing the command line argumentspublic void disconnect()
public java.lang.String getInput()
public java.lang.Object[] getServices()
public void shutdown()
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |