DBAbstract API Documentation

ro.raducora.connection.client.tcp
Class ClientTCPAdapter

java.lang.Object
  |
  +--ro.raducora.connection.client.tcp.ClientTCPAdapter
All Implemented Interfaces:
AdapterBase, java.lang.Cloneable

public class ClientTCPAdapter
extends java.lang.Object
implements AdapterBase

Author:
Radu Coravu
An Adapter which connects to a DBAbstract Server

Constructor Summary
ClientTCPAdapter(ClientTCPProps props, StreamEncryptionKey inkey, StreamEncryptionKey outkey)
          Constructor.
ClientTCPAdapter(java.lang.String remoteHost, int remotePort, StreamEncryptionKey inkey, StreamEncryptionKey outkey)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clone supported
 void connect(ConnectInfo info)
          Connects to Remote Source
 void disconnect()
          Disconnect from remote source.
 java.lang.Object getConnectionStatus()
          Gets the connection status returned by the connect method
 boolean isAbstractConnection()
          Return true
 boolean isConnected()
           
 java.lang.Object queryObject(java.lang.Object sent)
          Query Object
 void reloadProperties()
          Reloads the ClientTCPProps.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientTCPAdapter

public ClientTCPAdapter(ClientTCPProps props,
                        StreamEncryptionKey inkey,
                        StreamEncryptionKey outkey)
Constructor.

Parameters:
props - Client TCP properties
inkey - Decryption Key for input stream
outkey - Encryption Key for output stream

ClientTCPAdapter

public ClientTCPAdapter(java.lang.String remoteHost,
                        int remotePort,
                        StreamEncryptionKey inkey,
                        StreamEncryptionKey outkey)
Constructor.

Parameters:
remoteHost - Remote host to connect to
remotePort - Port to connect to
inkey - Decryption Key for input stream
outkey - Encryption Key for output stream
Method Detail

queryObject

public java.lang.Object queryObject(java.lang.Object sent)
                             throws java.lang.Exception
Query Object

Specified by:
queryObject in interface AdapterBase
Returns:
the queried object
java.lang.Exception

isConnected

public boolean isConnected()
Specified by:
isConnected in interface AdapterBase
Returns:
true if connected

connect

public void connect(ConnectInfo info)
             throws java.lang.Exception
Connects to Remote Source

Specified by:
connect in interface AdapterBase
Parameters:
info - -the connection info
Throws:
java.lang.Exception

disconnect

public void disconnect()
                throws java.io.IOException
Disconnect from remote source.

Specified by:
disconnect in interface AdapterBase
java.io.IOException

reloadProperties

public void reloadProperties()
                      throws java.lang.Exception
Reloads the ClientTCPProps.

Specified by:
reloadProperties in interface AdapterBase
Throws:
java.lang.Exception

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone supported

Specified by:
clone in interface AdapterBase
Overrides:
clone in class java.lang.Object
java.lang.CloneNotSupportedException

isAbstractConnection

public boolean isAbstractConnection()
Return true

Specified by:
isAbstractConnection in interface AdapterBase

getConnectionStatus

public java.lang.Object getConnectionStatus()
Gets the connection status returned by the connect method

Specified by:
getConnectionStatus in interface AdapterBase
Returns:
the connection status Can be a RedirectException, a RemoteException or an "OK" status.

DBAbstract API Documentation

© Copyright Radu Coravu 2002 - 2004.