at.spardat.xma.boot.component
Class ComponentHelper

java.lang.Object
  extended byat.spardat.xma.boot.component.ComponentHelper
All Implemented Interfaces:
IComponentHelper

public class ComponentHelper
extends java.lang.Object
implements IComponentHelper

This class is deployed in the same classloader as SWT and IComponent. It encapsulates the code of the bootruntime which is dependend on SWT.


Constructor Summary
ComponentHelper()
           
 
Method Summary
 IComponent castToIComponent(java.lang.Object component)
          Just casts the given object to IComponent.
 void cleanupSWTDisplay()
          Disposes the display created by initSWTDisplay() of this ComponentHelper.
 IRtXMASessionClient getRTSession(java.lang.Object component)
          Calls IComponent.getRTSession() on the given component.
 java.lang.Object initSWTDisplay()
          Creates a Display in SWT if none allready exists.
 java.util.Properties launch(java.lang.Object component, java.util.Properties input)
          Launches the given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentHelper

public ComponentHelper()
Method Detail

castToIComponent

public IComponent castToIComponent(java.lang.Object component)
Just casts the given object to IComponent.

Specified by:
castToIComponent in interface IComponentHelper
Returns:
the unchanged component
Throws:
java.lang.ClassCastException - if the given object is not an IComponent

getRTSession

public IRtXMASessionClient getRTSession(java.lang.Object component)
Calls IComponent.getRTSession() on the given component.

Specified by:
getRTSession in interface IComponentHelper
Returns:
the client side session the given component belongs to.
Throws:
java.lang.ClassCastException - if the given object is not an IComponent

launch

public java.util.Properties launch(java.lang.Object component,
                                   java.util.Properties input)
Launches the given component. The input properties are passed to the component, then the component is invoked. Finally the component is disposed.

Specified by:
launch in interface IComponentHelper
Returns:
the output properties of the given component
Throws:
java.lang.ClassCastException - if the given object is not an IComponent

initSWTDisplay

public java.lang.Object initSWTDisplay()
Creates a Display in SWT if none allready exists.

Specified by:
initSWTDisplay in interface IComponentHelper
Returns:
the preexisting or created Display.

cleanupSWTDisplay

public void cleanupSWTDisplay()
Disposes the display created by initSWTDisplay() of this ComponentHelper. If no display was created by initSWTDisplay(), it does nothing.

Specified by:
cleanupSWTDisplay in interface IComponentHelper