com.sdm.quasar.client.core.application
Interface Application

All Known Implementing Classes:
AbstractApplication, QuasarCompositeApplication

public interface Application

Represents the client application and offers access to the basic components of the application scope.

Note: Whoever instantiates the application is responsible for calling the method start() afterwords.

Version:
1.0
Author:
Martin Haft, sd&m AG, Carsten Lucke, sd&m AG, Bernd Olleck, sd&m AG

Method Summary
 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.
 void start()
          Realizes application startup.
 void stop()
          Realizes application shutdown.
 

Method Detail

start

public void start()
Realizes application startup.

In this method:

This method will be called after the creation of an instance.

An implementation can assume, that the Application already has an environment, e.g. the methods getConfigManager(), getServiceManager() and getSessionManager() return valid and usable instances. Core services and initial configurations may already have been registered at this managers. But the SessionManager does not have a Session; starting sessions is in responsability of the implementor of this method.


stop

public void stop()
          throws DisposeException
Realizes application shutdown.

This method should remove registrations and do clean-up stuff, as necessary. An implementation should destroy all sessions and free all used resources. If appropriate, the virtual machine should be terminated at the end of this method.

The call to this method is irrevokable. If you want to allow for user interaction or server calls, you should do so before calling this method.

Note: The implementation must not return before the application is shut down. Any threads or asynchronous calls started during execution must be completed before this method returns.

Note: The Implementation should be able to cope with the same or other threads calling methods of the interface while executing this method. Avoid an implementation that may produce a deadlock.

Throws:
DisposeException - if there is an exception while destroying the components

getServiceManager

public ServiceManager getServiceManager()
Returns the object that implements the ServiceManager interface.

Returns:
the service manager

getConfigManager

public ConfigManager getConfigManager()
Returns the ConfigManager of the application scope.

Returns:
the config manager

getSessionManager

public SessionManager getSessionManager()
Returns the SessionManager of the application scope.

Returns:
the session manager

getApplicationID

public ID getApplicationID()
Returns the application ID. The application ID is used to identify the application as a target for communication purposes.

Returns:
the application id.