at.spardat.xma.boot.comp
Class AppManager

java.lang.Object
  extended byat.spardat.xma.boot.comp.AppManager

public class AppManager
extends java.lang.Object

The AppManager is responsible for handling the application-context and classloaders for xma-components that it also invokes.


Constructor Summary
AppManager(java.util.Properties pnew)
          constructor
 
Method Summary
 void endComponent(IComponent rtc)
          cleanup components and application resources.
 IComponentHelper getCompHelper()
          Returns the ComponentHelper used for SWT-dependent methods.
 IComponent getComponent(java.lang.String component)
          prepare, and instantiate a component.
 IComponent getComponent(java.lang.String component, java.util.Properties properties)
          prepare, and instantiate a component.
static AppManager getInstance()
          get instance
 CCLoader getSWTClassLoader()
          Returns the classloader used for loading SWT classes.
static AppManager initialize(java.util.Properties pnew)
          initialisation
 java.util.Properties launch(java.lang.String component, java.util.Properties input)
          prepare, and start a component.
 AppContainer loadAndUpdateApplication(XMA_URI uri)
          Loads the given application from the cache and updates it from the server if neccessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppManager

public AppManager(java.util.Properties pnew)
constructor

Method Detail

initialize

public static AppManager initialize(java.util.Properties pnew)
initialisation


getInstance

public static AppManager getInstance()
get instance


getComponent

public IComponent getComponent(java.lang.String component)
                        throws java.lang.Exception
prepare, and instantiate a component.
Launcher.launch(java.lang.String, at.spardat.xma.boot.KeyValue[])

Throws:
java.lang.Exception - unrecoverable exception.

getComponent

public IComponent getComponent(java.lang.String component,
                               java.util.Properties properties)
                        throws java.lang.Exception
prepare, and instantiate a component.
Launcher.launch(java.lang.String, at.spardat.xma.boot.KeyValue[])

Throws:
java.lang.Exception - unrecoverable exception.

launch

public java.util.Properties launch(java.lang.String component,
                                   java.util.Properties input)
                            throws java.lang.Exception
prepare, and start a component.
Launcher.launch(java.lang.String, at.spardat.xma.boot.KeyValue[])

Throws:
java.lang.Exception - unrecoverable exception.

endComponent

public void endComponent(IComponent rtc)
cleanup components and application resources. logout from application, if this component is the last one for this application.

Parameters:
rtc - the terminating component

loadAndUpdateApplication

public AppContainer loadAndUpdateApplication(XMA_URI uri)
                                      throws CommunicationException,
                                             BootRuntimeException
Loads the given application from the cache and updates it from the server if neccessary.

Parameters:
uri - of the application
Returns:
AppContainer containing the loaded application description
Throws:
CommunicationException - if the application hash can not be loaded from the server
BootRuntimeException - if the download of the application resources failed twice

getSWTClassLoader

public CCLoader getSWTClassLoader()
Returns the classloader used for loading SWT classes. This method just calls AppLoader.getSwtClassLoader()

Returns:
the swtClassloader or null if no AppLoader or no swtClassloader allready exists.

getCompHelper

public IComponentHelper getCompHelper()
Returns the ComponentHelper used for SWT-dependent methods. This method just calls AppLoader.getCompHelper()

Returns:
the ComponentHelper or null if no AppLoader or no ComponentHelper allready exists.