com.informix.asf

## Class Connection

- java.lang.Object
- - com.informix.asf.Connection

    public class Connection
    extends java.lang.Object

This class handles the connection to the server.

### Field Summary

Fields
`java.lang.String` `ApplidName`
`int` `Cap_1`
`int` `Cap_2`
`int` `Cap_3`
`java.lang.String` `SerialNumber`
`java.lang.String` `sqliFile`
`SqliDbg` `sqliTrace`
`java.lang.String` `VersionNumber`
`short` `Warnings`

### Constructor Summary

Constructors
Constructor and Description
`Connection(java.lang.String username, java.lang.String password, java.lang.String addr, java.lang.String servername, java.lang.String dbname, java.util.Properties envlist, java.lang.String versionnumber, int capabilities, java.lang.String serialnumber, int retryCount, java.util.Properties optProps, Trace trace)` Connection: Creates a socket connection to the server.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `disconnectAbortive()` disconnectAbortive(): This is an abortive disconnect.
`void` `disconnectOrderly()` disconnectOrderly (): This is an orderly disconnect.
`protected void` `finalize()`
`IfxDataInputStream` `getIfxDataInputStream()`
`IfxDataOutputStream` `getIfxDataOutputStream()`
`int` `getNetworkTimeout()`
`java.lang.String` `getUserName()`
`boolean` `isValid()`
`void` `setNetworkTimeout(int timeout)`
`void` `sOOBSocket()` sOOBSocket (): This is an out-of-band data Sends a one byte of out-of-band data to the server

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### sqliFile

    public java.lang.String sqliFile

#### sqliTrace

    public SqliDbg sqliTrace

#### VersionNumber

    public java.lang.String VersionNumber

#### SerialNumber

    public java.lang.String SerialNumber

#### ApplidName

    public java.lang.String ApplidName

#### Cap_1

    public int Cap_1

#### Cap_2

    public int Cap_2

#### Cap_3

    public int Cap_3

#### Warnings

    public short Warnings

### Constructor Detail

#### Connection

    public Connection(java.lang.String username,
                      java.lang.String password,
                      java.lang.String addr,
                      java.lang.String servername,
                      java.lang.String dbname,
                      java.util.Properties envlist,
                      java.lang.String versionnumber,
                      int capabilities,
                      java.lang.String serialnumber,
                      int retryCount,
                      java.util.Properties optProps,
                      Trace trace)
               throws IfxASFException

Connection: Creates a socket connection to the server. Sends and receives the connection packet to the Informix database server. Allows the caller to get the internal Input/output datastream objects.

Parameters:
  `username:` - The username to log on to the server. It can be null.
  `password:` - The password to log on to the server. It cannot be null.
  `addr:` - For the pharse I release, The addr conatains the IP address and port number in the following format that will be used to establish a socket connection to a server. ip1.ip2.ip3.ip4,PortNumber where ip1 is the first decimal number of the ip dotted_decimal address, ip2 is the second decimal number of the ip dotted_decimal address, and etc.
  `servername:` - Informix servername.
  `dbname:` - Database name.
  `envlist:` - environment-variable list represented as a Java Properties object.
  `versionnumber` -
  `capabilities:` - Application capabilities, opaque to ASF
  `serialnumber` -
  `retryCount:` - Number of times to retry the socket connection.
  `optProps:` - Property list that contains security, sqlhosts information or LDAP info.
Throws:
  `IfxASFException:` - If an error has occured.
  `IfxASFException`

### Method Detail

#### sOOBSocket

    public void sOOBSocket()
                    throws IfxASFException

sOOBSocket (): This is an out-of-band data Sends a one byte of out-of-band data to the server

Throws:
  `IfxASFException` - : if I/O error has occured.

#### disconnectOrderly

    public void disconnectOrderly()
                           throws IfxASFException

disconnectOrderly (): This is an orderly disconnect. Sends a SQ_EXIT message to the server, waits for a SQ_EXIT reply and closes the socket connection.

Throws:
  `IfxASFException` - : if reply is found to be other than SQ_EXIT or I/O error has occured.

#### disconnectAbortive

    public void disconnectAbortive()
                            throws IfxASFException

disconnectAbortive(): This is an abortive disconnect. This closes the socket connection.

Throws:
  `IfxASFException` - If an I/O Error has occured.

#### getIfxDataInputStream

    public IfxDataInputStream getIfxDataInputStream()
                                             throws IfxASFException

Throws:
  `IfxASFException`

#### getIfxDataOutputStream

    public IfxDataOutputStream getIfxDataOutputStream()
                                               throws IfxASFException

Throws:
  `IfxASFException`

#### getUserName

    public java.lang.String getUserName()

#### finalize

    protected void finalize()

Overrides:
  `finalize` in class `java.lang.Object`

#### setNetworkTimeout

    public void setNetworkTimeout(int timeout)
                           throws java.net.SocketException

Throws:
  `java.net.SocketException`

#### getNetworkTimeout

    public int getNetworkTimeout()
                          throws java.net.SocketException

Throws:
  `java.net.SocketException`

#### isValid

    public boolean isValid()