public interface IApplicationContext
This interface is not intended to be implemented by clients.
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_ARGS
A key used to store arguments for the application.
|
static Object |
EXIT_ASYNC_RESULT
Exit object that indicates the application result will be delivered asynchronously.
|
static String |
EXIT_DATA_PROPERTY
A system property that may be set by an application to specify exit data
for the application.
|
Modifier and Type | Method and Description |
---|---|
void |
applicationRunning()
This method should be called once the application is completely initialized and running.
|
Map |
getArguments()
The arguments used for the application.
|
String |
getBrandingApplication()
Returns the application associated with this application context.
|
Bundle |
getBrandingBundle()
Returns the bundle which is responsible for the definition of the product associated with
this application context.
|
String |
getBrandingDescription()
Returns the text description of the product associated with this application context.
|
String |
getBrandingId()
Returns the unique product id of the product associated with this application context.
|
String |
getBrandingName()
Returns the name of the product associated with this application context.
|
String |
getBrandingProperty(String key)
Returns the property with the given key of the product associated with this application context.
|
void |
setResult(Object result,
IApplication application)
Sets the result of the application asynchronously.
|
static final String EXIT_DATA_PROPERTY
String
.
Typically applications do not need to set this property. If an error is detected while launching or running an application then the launcher will set this property automatically in order to display a message to the end user. An application may set this property for the following reasons:
IApplication.EXIT_RELAUNCH
String
. This is useful for
headless applications where error dialogs must never be displayed.static final String APPLICATION_ARGS
String
array.
If the map used to launch an application ApplicationDescriptor.launch(Map)
does
not contain a value for this key then command line arguments used to launch
the platform are set in the arguments of the application context.
static final Object EXIT_ASYNC_RESULT
IApplication.start(IApplicationContext)
for applications which deliver a result asynchronously with the method
setResult(Object, IApplication)
.Map getArguments()
ApplicationDescriptor.launch(Map)
are used as the arguments
for this context when an application is launched.void applicationRunning()
String getBrandingApplication()
null
if noneString getBrandingName()
null
if noneString getBrandingDescription()
null
if noneString getBrandingId()
String getBrandingProperty(String key)
null
is returned if there is no such key/value pair.key
- the name of the property to returnnull
if noneBundle getBrandingBundle()
null
if nonevoid setResult(Object result, IApplication application)
start
method has returned the value of EXIT_ASYNC_RESULT
.
The specified application must be the same application instance which is
associated with this application context. In other word the application instance
for which IApplication.start(IApplicationContext)
was called with this
application context; otherwise an IllegalArgumentException
is
thrown.
result
- the result value for the application. May be null.application
- the application instance associated with this application contextIllegalStateException
- if EXIT_ASYNC_RESULT
was
not returned by the application's start
method or if the result has already been set for this application context.IllegalArgumentException
- if the specified application is not the same
application instance associated with this application context.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.