Rational Developer for i
7.5.0

com.ibm.etools.iseries.connectorservice
Class ToolboxConnectorService

java.lang.Object
  extended by AuthenticatingConnectorService
      extended by com.ibm.etools.iseries.connectorservice.ToolboxConnectorService

public class ToolboxConnectorService
extends AuthenticatingConnectorService

Connector service for i5/OS connections. This connector service uses the Toolbox for Java.


Field Summary
static String copyright
           
 
Constructor Summary
protected ToolboxConnectorService(IHost host)
          Constructor.
 
Method Summary
 void disconnectJDBC()
          Close all open jdbc connections.
 AS400 getAS400()
           
 AS400 getAS400(boolean connect)
           
 com.ibm.etools.iseries.internal.connectorservice.ICODEServerManager getCODEServerManager(com.ibm.etools.iseries.internal.connectorservice.ICODEServerManagerFactory factory)
          Return the CODE Server manager instance that corresponds to this connection
 String getEncodedPassword()
          Get the password for this connection.
 String getHomeDirectory()
           
 Connection getJDBCConnection(String properties, boolean forceConnect)
          Get a JDBC Connection object to DB2/400, pre-connected, for this connection.
 String getTempDirectory()
           
 String getVersionReleaseModification()
           
 void handleNetworkError(Exception e)
          Checks if the exception resulted in the network connection being dropped.
protected  void internalConnect(IProgressMonitor monitor)
           
protected  void internalDisconnect(IProgressMonitor monitor)
           
 boolean isConnected()
           
 boolean requiresPassword()
           
 boolean requiresUserId()
           
 boolean supportsPassword()
           
 boolean supportsUserId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

ToolboxConnectorService

protected ToolboxConnectorService(IHost host)
Constructor. The constructor is protected to prevent users from directly instantiating an instance. All users should obtain an instance from the ToolboxConnectorServiceManager

Method Detail

internalConnect

protected void internalConnect(IProgressMonitor monitor)
                        throws Exception
Throws:
Exception

internalDisconnect

protected void internalDisconnect(IProgressMonitor monitor)
                           throws InterruptedException
Throws:
InterruptedException

isConnected

public boolean isConnected()

getEncodedPassword

public String getEncodedPassword()
Get the password for this connection. The password is returned in an encrypted form.


getAS400

public AS400 getAS400()

getAS400

public AS400 getAS400(boolean connect)

requiresPassword

public boolean requiresPassword()

requiresUserId

public boolean requiresUserId()

supportsPassword

public boolean supportsPassword()

supportsUserId

public boolean supportsUserId()

handleNetworkError

public void handleNetworkError(Exception e)
                        throws SystemMessageException
Checks if the exception resulted in the network connection being dropped. If so, dialog is shown to the user and an exception is thrown.

Throws:
SystemMessageException

getCODEServerManager

public com.ibm.etools.iseries.internal.connectorservice.ICODEServerManager getCODEServerManager(com.ibm.etools.iseries.internal.connectorservice.ICODEServerManagerFactory factory)
Return the CODE Server manager instance that corresponds to this connection


getTempDirectory

public String getTempDirectory()

getHomeDirectory

public String getHomeDirectory()

getVersionReleaseModification

public String getVersionReleaseModification()

getJDBCConnection

public Connection getJDBCConnection(String properties,
                                    boolean forceConnect)
                             throws SQLException
Get a JDBC Connection object to DB2/400, pre-connected, for this connection.

Important notes:

Parameters:
properties - A list of properties to append to the url, as per the JDBC/400 getConnection(...) support. This string is appended to the string "jdbc:as400://" + getHostName(), and so must start with a semicolon. If null is passed, the following is used: ";prompt=false;big decimal=false"
forceConnect - whether to prompt user to signon if not already.
Throws:
SQLException

disconnectJDBC

public void disconnectJDBC()
Close all open jdbc connections. Called implicit on disconnect()


Rational Developer for i
7.5.0

Copyright 2009 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.