org.ifeth.sehr.client.api
Class SEHRConnectionDriver

java.lang.Object
  extended byorg.ifeth.sehr.client.api.SEHRConnectionDriver
All Implemented Interfaces:
SEHRConnectionDriverInterface

public class SEHRConnectionDriver
extends java.lang.Object
implements SEHRConnectionDriverInterface

Driver for handling different client/server connctions like LAN/WLAN, Dial-Up and others.

Common Usage: Use static method to load the driver and let SEHRRemotemanage the connection. The driver itself is an abstract class that will be instanciated here as an object that includes various methods for onnection control and notification messages (see ConnectionDriver).

To improve the flexibility of possible physical links to a SEHR host the required or prefered driver will be loaded by a class loader. This class is an layer between the physical connection driver and the requirements of connections by the SEHR components. Discussed requirements are:

  • One connection handler for any kind of physical c/s access to reduce and prevent driver specific coding in the API model classes
  • Flexible usage of proven drivers for RAS connctions
  • Common and reusable methods to get state and summary informations about the current or previous connections
  • Hide sensible informations from client applications to improve security
  • Easy to use connection methods for developers of client applications
  • Code and connection stability
  • Author:
    hansjhaase, kaesebrot (M Drescher)

    Field Summary
     
    Fields inherited from interface org.ifeth.sehr.client.api.SEHRConnectionDriverInterface
    COSTCONTROL_NONE, COSTCONTROL_TIME, COSTCONTROL_VOLUME, DRV_ASYNC, DRV_LAN, DRV_RAS, TYPE_ASYNC, TYPE_LAN, TYPE_RAS, TYPE_WLAN
     
    Constructor Summary
    SEHRConnectionDriver()
              Parameterless constructor.
    SEHRConnectionDriver(java.lang.String driverclass)
              Constructor for using a specific driver to connect
     
    Method Summary
     ConnectionDriver getConnectionDriver()
              Get currently used driver as class
     java.lang.String getDriverclassForName()
              Get currently used driver as name (for informational usage only)
     void getErrorMessage()
              Get error message from notification class of the driver
     void getStateMessage()
              Get status message from notification class of the driver
     int getTypeOfConnection()
              Get currently type of driver (for informational usage only)
    static ConnectionDriver loadDriver(java.lang.String driverclass)
              Load the driver to use for physical connections
     void setDriverclassForName(java.lang.String drivername)
              Set driver class to use for c/s connections Note: Required on object instances only.
     
    Methods inherited from class java.lang.Object
    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    SEHRConnectionDriver

    public SEHRConnectionDriver()
    Parameterless constructor.

    The class must be set by setDriverclassForName(String)before a connection can be established.


    SEHRConnectionDriver

    public SEHRConnectionDriver(java.lang.String driverclass)
    Constructor for using a specific driver to connect

    Method Detail

    loadDriver

    public static ConnectionDriver loadDriver(java.lang.String driverclass)
                                       throws java.lang.Exception
    Load the driver to use for physical connections

    Throws:
    java.lang.Exception

    getConnectionDriver

    public ConnectionDriver getConnectionDriver()
    Get currently used driver as class


    setDriverclassForName

    public void setDriverclassForName(java.lang.String drivername)
    Set driver class to use for c/s connections Note: Required on object instances only.

    See Also:
    SEHRConnectionDriver

    getDriverclassForName

    public java.lang.String getDriverclassForName()
    Get currently used driver as name (for informational usage only)


    getTypeOfConnection

    public int getTypeOfConnection()
    Get currently type of driver (for informational usage only)


    getErrorMessage

    public void getErrorMessage()
    Get error message from notification class of the driver


    getStateMessage

    public void getStateMessage()
    Get status message from notification class of the driver