|
|||||||||||
| 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 unless isShared is false.
Examples of connection tags:
localhost
The MDM server is on the local machine and the default port number of 59950.
MyMachine;40000
The MDM server is on the "MyMachine" and the port number is 40000.
ConnectionPool,
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 int |
getConnectionCreationTimeout()
Returns the SO_TIMEOUT used when establishing a new connection. |
static ConnectionPool |
getInstance(String connectionTag)
Returns a connection pool instance associated with the MDM server specified by the connection tag. |
static ConnectionPool |
getInstance(String connectionTag,
boolean isShared)
Returns a connection pool instance associated with the MDM server specified by the connection tag. |
static ConnectionPool |
getInstance(String connectionTag,
boolean isShared,
boolean isCheckConnections)
Returns a connection pool instance associated with the MDM server specified by the connection tag. |
static ConnectionPool |
getInstance(String connectionTag,
boolean isShared,
boolean isCheckConnections,
SocketFactory socketFactory)
Returns a connection pool instance for SSL connections associated with the MDM server specified by the connection tag. |
static ConnectionPool |
getInstance(String connectionTag,
String connectionSource)
Deprecated. there is really no way to make use of connection source |
static ConnectionPool |
getInstance(String connectionTag,
String connectionSource,
boolean isShared,
boolean isCheckConnections,
SocketFactory socketFactory)
Returns a connection pool instance for SSL and non-SSL connections 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 ConnectionPool[] |
getSharedInstances()
Returns all shared instances of connection pool that are cached in this factory |
static int |
getTimeout()
Returns the SO_TIMEOUT used during normal communication with the MDM server. |
static void |
setConnectionCreationTimeout(int timeout)
Sets the SO_TIMEOUT used when establishing a new connection. |
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 used during normal communication with the MDM server. |
| 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(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(String connectionTag,
boolean isShared)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numberisShared - indicates if the instance can be shared
ConnectionException - if not able to create a connection to the MDM server
public static ConnectionPool getInstance(String connectionTag,
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 server
public static ConnectionPool getInstance(String connectionTag,
boolean isShared,
boolean isCheckConnections)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numberisShared - indicates if the instance can be sharedisCheckConnections - indicates if connections are checked periodically, requiring a background thread
ConnectionException - if not able to create a connection to the MDM server
public static ConnectionPool getInstance(String connectionTag,
boolean isShared,
boolean isCheckConnections,
SocketFactory socketFactory)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numberisShared - indicates if the instance can be sharedisCheckConnections - indicates if connections are checked periodically, requiring a background threadsocketFactory - the socket factory, if null, a plain socket is used
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 - a timeout in millisecondsSocket.setSoTimeout(int)public static int getTimeout()
public static int getConnectionCreationTimeout()
public static void setConnectionCreationTimeout(int timeout)
timeout - a timeout in millisecondsSocket.setSoTimeout(int)public static ConnectionPool[] getSharedInstances()
ConnectionException - if not able to create a connection to the MDM server
public static ConnectionPool getInstance(String connectionTag,
String connectionSource,
boolean isShared,
boolean isCheckConnections,
SocketFactory socketFactory)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numberconnectionSource - the connection source identifierisShared - indicates if the instance can be sharedisCheckConnections - indicates if connections are checked periodically, requiring a background threadsocketFactory - the socket factory, if null, a plain socket is used
ConnectionException - if not able to create a connection to the MDM server
|
|||||||||||
| 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.