|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.application.AbstractApplication
Abstract implementation for the Application interface.
This is a common implementation shared by all more specific
client-architecture developments.
A derived class should overwrite the methods
Application.start() and
Application.stop().
The implementation of this class may be used to allow a simple
initialization of the application.
| Constructor Summary | |
AbstractApplication(ID applicationId)
Constructor. |
|
| Method Summary | |
void |
collectSystemInfo(SystemInfoNode root,
SystemInfoOptions options)
Builds the system information tree upon local information of the implementor. |
protected DisposeException |
extendDestructionException(DisposeException destructionException,
java.lang.String message,
java.lang.Throwable cause)
Helper method used during stop().
|
protected ApplicationConfiguration |
getApplicationConfiguration()
Returns the ApplicationConfiguration instance used to configure this
application instance. |
ID |
getApplicationID()
Returns the application ID. |
ConfigManager |
getConfigManager()
Returns the ConfigManager of the application scope. |
ServiceManager |
getServiceManager()
Returns the object that implements the ServiceManager interface. |
SessionManager |
getSessionManager()
Returns the SessionManager of the application scope. |
protected void |
initializeErrorHandler()
Initializes the error handling. |
void |
start()
This implementation initializes the additional application components in the following order: ErrorHandler by using initializeErrorHandler()
LoggerFactory by using #initializeLogging()
|
void |
stop()
This implementation disposed the application components in the following order if the corresponding component implements Disposable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractApplication(ID applicationId)
applicationId - the id of the application| Method Detail |
protected ApplicationConfiguration getApplicationConfiguration()
ApplicationConfiguration instance used to configure this
application instance.
public ID getApplicationID()
Application
getApplicationID in interface Applicationpublic ConfigManager getConfigManager()
ApplicationConfigManager of the application scope.
getConfigManager in interface Applicationpublic ServiceManager getServiceManager()
ApplicationServiceManager interface.
getServiceManager in interface Applicationpublic SessionManager getSessionManager()
ApplicationSessionManager of the application scope.
getSessionManager in interface Applicationpublic void start()
ErrorHandler by using initializeErrorHandler()
LoggerFactory by using #initializeLogging()
start in interface Application
public void stop()
throws DisposeException
Disposable. Otherwise the component
is skipped.
stop in interface ApplicationDisposeException - if there is an exception while disposing the componentsfor further information
protected DisposeException extendDestructionException(DisposeException destructionException,
java.lang.String message,
java.lang.Throwable cause)
stop().
Extends a destruction exception that includes the given message and cause.
If there is already a destruction exception present, message and cause will be added to it
and it will be returned. If there is no destruction exception, one will be created with
the default message and the given message and cause will be added.
destructionException - the possibly existing destruction exception, may be nullmessage - the message to be added, may be nullcause - the cause to be added, may be null
protected void initializeErrorHandler()
ErrorHandlerAdapter with the
ErrorHandler that calls Application.stop() to stop the application.
The ErrorHandlerAdapter registered in this implementation
does not attempt to restrict the error to a single
dialog or session.
Depending on the client enviromnent you need to override this error handler to do something more useful.
public void collectSystemInfo(SystemInfoNode root,
SystemInfoOptions options)
SystemInfoProviderSystemInfoOptions).
The information can be appended to the tree by adding new child
SystemInformationNodes to the root node given using the
SystemInfoNode.createChild(String) method and by setting information
attributes the these nodes or the given root node.
collectSystemInfo in interface SystemInfoProviderroot - the SystemInfoNode to add information to (guaranteed to be not null)options - contains additional options, that might influence the amount of
information added to the tree (guaranteed to be not null)SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||