|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.mdm.net.SimpleConnectionFactory
This class allows for creating a connection to the MDM server. A connection is needed whenever the MDM Java API needs to communicate with the MDM server. A connection is tied to a specific MDM server.
A simple connection is used, as opposed to a connection pool, in cases where there is no need for the more complex connection pool or when there exist a service that provide resource pooling.
Each call to getInstance returns a new instance.
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.
Note: It is entirely up to the user to manage the lifetime of the simple connections. In addition, in certain circumstances, some operation system will not release the listening port on the server side until all client side sockets connecting to the listening port are closed.
ConnectionPoolFactory| Field Summary | |
static int |
NO_TIMEOUT
A constant for specifying no timeout. |
| Constructor Summary | |
SimpleConnectionFactory()
|
|
| Method Summary | |
static int |
getConnectionCreationTimeout()
Returns the SO_TIMEOUT used when establishing a new connection. |
static SimpleConnection |
getInstance(String connectionTag)
Returns a non-SSL connection to the MDM server. |
static SimpleConnection |
getInstance(String connectionTag,
SocketFactory socketFactory)
Returns a SSL connection to the MDM server. |
static SimpleConnection |
getInstance(String connectionTag,
String connectionSource)
Deprecated. there is really no way to make use of connection source |
static SimpleConnection |
getInstance(String connectionTag,
String connectionSource,
SocketFactory socketFactory)
Deprecated. there is really no way to make use of connection source |
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 |
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
| Constructor Detail |
public SimpleConnectionFactory()
| Method Detail |
public static SimpleConnection 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 SimpleConnection getInstance(String connectionTag,
SocketFactory socketFactory)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numbersocketFactory - the socket factory, if null, a plain socket is used
ConnectionException - if not able to create a connection to the MDM server
public static SimpleConnection getInstance(String connectionTag,
String connectionSource)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numberconnectionSource - the connection source
ConnectionException - if not able to create a connection to the MDM server
public static SimpleConnection getInstance(String connectionTag,
String connectionSource,
SocketFactory socketFactory)
throws ConnectionException
connectionTag - the connection tag encoding the host name and the port numberconnectionSource - the connection sourcesocketFactory - the socket factory, if null, a plain socket is used
ConnectionException - if not able to create a connection to the MDM serverpublic 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)
|
|||||||||||
| 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.