org.ifeth.sehr.client.api.driver
Class SEHRConnection

java.lang.Object
  extended byorg.ifeth.sehr.client.api.driver.SEHRConnection

public class SEHRConnection
extends java.lang.Object

The connection layer object from a client to a SEHR host...

This object is a container which carries the connection info through the different instances like listeners etc.

Author:
hansjhaase
See Also:
ConnectionInfo

Constructor Summary
SEHRConnection(ConnectionInfo coninfo)
           
 
Method Summary
 boolean close()
          Request close, but let the thread do it to prevent lost data on currently open db conenctions
=> thread runs a 'commit' lost transfers on active FTP transfer => thread waits until files are transfered
 ConnectionInfo getConnectionInfo()
          Get the information about the connection
 java.lang.Object getInitiator()
          Returns the Initiator associated with this connection For future use
 java.lang.Object getResponder()
          Returns the Responder associated with this connection For future use
 boolean isOpen()
          Returns 'true' if the SEHR connection is active, 'false' if a previous shutdown was requested, e.g. by a thread or an actionhandler.
 void setConnectionInfo(ConnectionInfo info)
          Set an information about the connection
 java.lang.String toString()
          For testing/debugging
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SEHRConnection

public SEHRConnection(ConnectionInfo coninfo)
Method Detail

getConnectionInfo

public ConnectionInfo getConnectionInfo()
Get the information about the connection


setConnectionInfo

public void setConnectionInfo(ConnectionInfo info)
Set an information about the connection


getInitiator

public java.lang.Object getInitiator()
Returns the Initiator associated with this connection

For future use


getResponder

public java.lang.Object getResponder()
Returns the Responder associated with this connection

For future use


close

public boolean close()
Request close, but let the thread do it to prevent
  • lost data on currently open db conenctions
    => thread runs a 'commit'
  • lost transfers on active FTP transfer => thread waits until files are transfered

  • isOpen

    public boolean isOpen()
    Returns 'true' if the SEHR connection is active, 'false' if a previous shutdown was requested, e.g. by a thread or an actionhandler.

    Use Case: Use this before invoking a connection to check if it makes sense to start a new connection :)


    toString

    public java.lang.String toString()
    For testing/debugging