org.geotools.arcsde.pool
Class ArcSDEConnectionConfig

Object
  extended by ArcSDEConnectionConfig

public class ArcSDEConnectionConfig
extends Object

Represents a set of ArcSDE database connection parameters. Instances of this class are used to validate ArcSDE connection params as in DataSourceFactory.canProcess(java.util.Map) and serves as keys for maintaining single SdeConnectionPool's by each set of connection properties

Author:
Gabriel Roldan
Module:

Field Summary
static String CONNECTION_TIMEOUT_PARAM
          DOCUMENT ME!
static String DBTYPE_PARAM
          must equals to "arcsde"
static String DBTYPE_PARAM_VALUE
          constant to pass "arcsde" as DBTYPE_PARAM
static String INSTANCE_NAME_PARAM
          ArcSDE databse name parameter name
static String MAX_CONNECTIONS_PARAM
          DOCUMENT ME!
static String MIN_CONNECTIONS_PARAM
          DOCUMENT ME!
static String NAMESPACE_PARAM
          namespace URI assigned to datastore instance
static String PASSWORD_PARAM
          ArcSDE database user password parameter name
static String PORT_NUMBER_PARAM
          ArcSDE server port parameter name
static String SERVER_NAME_PARAM
          ArcSDE server parameter name
protected static String TABLE_NAME_PARAM
          parameter name who's value represents the feature class for wich an SdeDataSource will be created
static String USER_NAME_PARAM
          ArcSDE database user name parameter name
 
Constructor Summary
ArcSDEConnectionConfig(Map params)
          Configure arcsde connection information from supplied connection parameters.
ArcSDEConnectionConfig(String dbType, String serverName, String portNumber, String databaseName, String userName, String userPassword)
          Define arcsde connection information.
 
Method Summary
 boolean equals(Object o)
          Checks for equality over another ArcSDEConnectionConfig, taking into account the values of database name, user name, and port number.
 Integer getConnTimeOut()
          DOCUMENT ME!
 String getDatabaseName()
          DOCUMENT ME!
 Integer getMaxConnections()
          DOCUMENT ME!
 Integer getMinConnections()
          DOCUMENT ME!
 String getNamespaceUri()
           
 Integer getPortNumber()
          DOCUMENT ME!
 String getServerName()
          DOCUMENT ME!
 String getUserName()
          DOCUMENT ME!
 String getUserPassword()
          accessor method for retrieving the user password of the ArcSDE connection properties holded here
 int hashCode()
          DOCUMENT ME!
 String toString()
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DBTYPE_PARAM

public static final String DBTYPE_PARAM
must equals to "arcsde"

See Also:
Constant Field Values

DBTYPE_PARAM_VALUE

public static final String DBTYPE_PARAM_VALUE
constant to pass "arcsde" as DBTYPE_PARAM

See Also:
Constant Field Values

NAMESPACE_PARAM

public static final String NAMESPACE_PARAM
namespace URI assigned to datastore instance

See Also:
Constant Field Values

SERVER_NAME_PARAM

public static final String SERVER_NAME_PARAM
ArcSDE server parameter name

See Also:
Constant Field Values

PORT_NUMBER_PARAM

public static final String PORT_NUMBER_PARAM
ArcSDE server port parameter name

See Also:
Constant Field Values

INSTANCE_NAME_PARAM

public static final String INSTANCE_NAME_PARAM
ArcSDE databse name parameter name

See Also:
Constant Field Values

USER_NAME_PARAM

public static final String USER_NAME_PARAM
ArcSDE database user name parameter name

See Also:
Constant Field Values

PASSWORD_PARAM

public static final String PASSWORD_PARAM
ArcSDE database user password parameter name

See Also:
Constant Field Values

MIN_CONNECTIONS_PARAM

public static final String MIN_CONNECTIONS_PARAM
DOCUMENT ME!

See Also:
Constant Field Values

MAX_CONNECTIONS_PARAM

public static final String MAX_CONNECTIONS_PARAM
DOCUMENT ME!

See Also:
Constant Field Values

CONNECTION_TIMEOUT_PARAM

public static final String CONNECTION_TIMEOUT_PARAM
DOCUMENT ME!

See Also:
Constant Field Values

TABLE_NAME_PARAM

protected static final String TABLE_NAME_PARAM
parameter name who's value represents the feature class for wich an SdeDataSource will be created

See Also:
Constant Field Values
TODO:
TODO: should this constant be moved to the SdeDataSource class? since SdeConnectionConfig thoes not validates the table param
Constructor Detail

ArcSDEConnectionConfig

public ArcSDEConnectionConfig(Map params)
                       throws NullPointerException,
                              IllegalArgumentException
Configure arcsde connection information from supplied connection parameters.

Parameters:
params - Connection parameters
Throws:
NullPointerException - if at least one mandatory parameter is null
IllegalArgumentException - if at least one mandatory parameter is present but does not have a "valid" value.

ArcSDEConnectionConfig

public ArcSDEConnectionConfig(String dbType,
                              String serverName,
                              String portNumber,
                              String databaseName,
                              String userName,
                              String userPassword)
                       throws NullPointerException,
                              IllegalArgumentException
Define arcsde connection information.

Parameters:
dbType -
serverName - host or ip address of server
portNumber - port number the server is listenting on
databaseName - database to connect to
userName - user name for arcsde
userPassword - user password for arcsde
Throws:
NullPointerException - If any of the parameters are null
IllegalArgumentException - If any of the paramters is not valid
Method Detail

getNamespaceUri

public String getNamespaceUri()

getDatabaseName

public String getDatabaseName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getPortNumber

public Integer getPortNumber()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getServerName

public String getServerName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getUserName

public String getUserName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getUserPassword

public String getUserPassword()
accessor method for retrieving the user password of the ArcSDE connection properties holded here

Returns:
the ArcSDE user password

hashCode

public int hashCode()
DOCUMENT ME!

Overrides:
hashCode in class Object
Returns:
DOCUMENT ME!

equals

public boolean equals(Object o)
Checks for equality over another ArcSDEConnectionConfig, taking into account the values of database name, user name, and port number.

Overrides:
equals in class Object
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

getConnTimeOut

public Integer getConnTimeOut()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMaxConnections

public Integer getMaxConnections()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMinConnections

public Integer getMinConnections()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toString

public String toString()
Overrides:
toString in class Object
Returns:
a human friendly description of this parameter holder contents (password is masked), mostly usefull for stack traces


Copyright © 1996-2009 Geotools. All Rights Reserved.