net.sf.xbus.technical.as400
Class AS400Connection

java.lang.Object
  extended by net.sf.xbus.technical.as400.AS400Connection

public class AS400Connection
extends java.lang.Object

AS400Connection manages connections to AS400 machines.

It implements the Singleton-Design-Pattern: Named instances of AS400Connection are created for every thread.

Configuration:

Chapter Section Key Content
AS400Connection name SystemName System name or IP-address of the AS400
AS400Connection name User User for accessing the AS400
AS400Connection name Password Password for the user


Method Summary
static void clear()
           
static AS400Connection getInstance(java.lang.String name)
          Delivers an instance of AS400Connection.
 com.ibm.as400.access.AS400 getSystem()
          Returns the AS400 object for the connection.
 boolean isTestSystem()
          Helper method for writing testdrivers when no AS400 is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AS400Connection getInstance(java.lang.String name)
                                   throws XException
Delivers an instance of AS400Connection.

If it is the first call with the given name for the actual thread, a new AS400Connection-object gets created. Subsequent calls with the given name in this thread will deliver the object, that has been created by the first call.

Parameters:
name - more than one AS400 can be connected, differenced by their name
Throws:
XException - if any error occurs

getSystem

public com.ibm.as400.access.AS400 getSystem()
Returns the AS400 object for the connection.

Returns:
AS400 object for the connection

isTestSystem

public boolean isTestSystem()
Helper method for writing testdrivers when no AS400 is available.

Returns:
true if this is not a real AS400

clear

public static void clear()