org.eclipse.net4j.util.om
Class OSGiApplication
java.lang.Object
org.eclipse.net4j.util.om.OSGiApplication
- All Implemented Interfaces:
- IApplication
public class OSGiApplication
- extends Object
- implements IApplication
- Author:
- Eike Stepper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OSGiApplication
public OSGiApplication(String applicationID)
getApplicationID
public String getApplicationID()
getApplicationContext
public IApplicationContext getApplicationContext()
isRunning
public boolean isRunning()
start
public final Object start(IApplicationContext context)
throws Exception
- Description copied from interface:
org.eclipse.equinox.app.IApplication
- Starts this application with the given context and returns a result. The content of
the context is unchecked and should conform to the expectations of the application being
invoked. This method can return the value
IApplicationContext.EXIT_ASYNC_RESULT
if
the application will deliver its results asynchronously with the
IApplicationContext.setResult(Object, IApplication)
method; otherwise this method must not exit
until the application is finished and is ready to exit.
Applications can return any object they like. If an Integer
is returned
it is treated as the program exit code if Eclipse is exiting.
Note: This method is called by the platform; it is not intended
to be called directly by clients.
- Specified by:
start
in interface IApplication
- Parameters:
context
- the application context to pass to the application
- Returns:
- the return value of the application
- Throws:
Exception
- if there is a problem running this application.- See Also:
IApplication.EXIT_OK
,
IApplication.EXIT_RESTART
,
IApplication.EXIT_RELAUNCH
,
IApplicationContext.EXIT_ASYNC_RESULT
stop
public final void stop()
- Description copied from interface:
org.eclipse.equinox.app.IApplication
- Forces this running application to exit. This method should wait until the
running application is ready to exit. The
IApplication.start(IApplicationContext)
should already have exited or should exit very soon after this method exits
This method is only called to force an application to exit.
This method will not be called if an application exits normally from
the IApplication.start(IApplicationContext)
method.
Note: This method is called by the platform; it is not intended
to be called directly by clients.
- Specified by:
stop
in interface IApplication
doStart
protected void doStart()
throws Exception
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Throws:
Exception
traceStart
public static void traceStart(String applicationID)
traceStop
public static void traceStop(String applicationID)
Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.