|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.mdm.net.ConnectionPoolFactory
This class manages the creation and the access to all connection pools. Each connection pool is tied to a particular MDM server and is identified by a connection tag which encodes its host name and port number.
The factory's static properties are used to set defaults for the connection pools. These defaults may be overridden by modifying each connection pool instance's settings.
The factory maintains a list of connection pool instances. A call to
getInstance for the same connection tag will return a previous
instance.
Examples of connection tags:
localhost
The MDM server is on the local machine and the default port number of 20005.
MyMachine;40000
The MDM server is on the "MyMachine" and the port number is 40000.
SimpleConnectionFactory| Field Summary | |
static int |
DEFAULT_MAX_CONNECTIONS
The default maximum number of connections for the connection pool. |
static int |
DEFAULT_MIN_CONNECTIONS
The default minimum number of connections for the connection pool. |
static int |
NO_TIMEOUT
A constant for specifying no timeout. |
| Method Summary | |
static ConnectionPool |
getInstance(java.lang.String connectionTag)
Returns a connection pool instance associated with the MDM server specified by the connection tag. |
static ConnectionPool |
getInstance(java.lang.String connectionTag,
java.lang.String connectionSource)
Returns a connection pool instance associated with the MDM server specified by the connection tag. |
static int |
getMaxConnections()
Returns the default value for the maximum number of connections that connection pools may open. |
static int |
getMinConnections()
Returns the default value for the minimum number of connections that connection pools will open upon initialization. |
static int |
getTimeout()
Returns the SO_TIMEOUT |
static void |
setMaxConnections(int maxConnections)
Sets the default value for the maximum number of connections that connection pools may open. |
static void |
setMinConnections(int minConnections)
Sets the default value for the minimum number of connections that connection pools will open upon initialization. |
static void |
setTimeout(int timeout)
Sets the SO_TIMEOUT. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NO_TIMEOUT
public static final int DEFAULT_MIN_CONNECTIONS
public static final int DEFAULT_MAX_CONNECTIONS
| Method Detail |
public static ConnectionPool getInstance(java.lang.String connectionTag)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port number
ConnectionException - if not able to create a connection to the MDM server
public static ConnectionPool getInstance(java.lang.String connectionTag,
java.lang.String connectionSource)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numberconnectionSource - the connection source identifier
ConnectionException - if not able to create a connection to the MDM serverpublic static int getMinConnections()
public static void setMinConnections(int minConnections)
minConnections - the minimum number of connectionspublic static int getMaxConnections()
public static void setMaxConnections(int maxConnections)
maxConnections - the maximum number of connectionspublic static void setTimeout(int timeout)
timeout - the timeout in millisecondsjava.net.Socketpublic static int getTimeout()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2004-2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.