com.sap.conn.jco.server
Class JCoServerFactory

java.lang.Object
  extended by com.sap.conn.jco.server.JCoServerFactory

public abstract class JCoServerFactory
extends java.lang.Object

Factory for creating a server instance. The factory uses the ServerDataProvider in order to obtain the server configuration. Note: A server instance may become invalid if the destination configuration is changed or removed. In such cases the running operation will be finished, but further usage of the invalidated server will be blocked by JCoException with the key JCO_ERROR_DESTINATION_DATA_INVALID. The application may fetch an updated server instance from JCoServerFactory, if it is suitable for the application scenario.


Method Summary
static JCoServerFactory get()
          Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use the static methods.
static int getNumberOfServerConnections(java.lang.String serverName)
          Query the number of registered server connections on the SAP gateway
abstract  int getNumServerConnections(java.lang.String serverName)
          Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use getNumServerConnections(String) instead.
static JCoServer getServer(java.lang.String serverName)
          Creates a new JCo server instance or returns an available instance.
abstract  JCoServer getServerInstance(java.lang.String serverName)
          Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use getServer(String) instead.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static JCoServerFactory get()
Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use the static methods.


getServerInstance

public abstract JCoServer getServerInstance(java.lang.String serverName)
                                     throws JCoException
Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use getServer(String) instead.

Throws:
JCoException

getNumServerConnections

public abstract int getNumServerConnections(java.lang.String serverName)
                                     throws JCoException
Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use getNumServerConnections(String) instead.

Throws:
JCoException

getServer

public static JCoServer getServer(java.lang.String serverName)
                           throws JCoException
Creates a new JCo server instance or returns an available instance.

Parameters:
serverName - the name of the server for which we want to get a server instance
Returns:
new JCo Server instance
Throws:
JCoException - if server configuration is wrong, e.g. a mandatory parameter is missing

getNumberOfServerConnections

public static int getNumberOfServerConnections(java.lang.String serverName)
                                        throws JCoException
Query the number of registered server connections on the SAP gateway

Parameters:
serverName - the serverName for which the number of connections should be checked
Returns:
number of registered server connections
Throws:
JCoException - if the gateway is not reachable


Copyright © 2008-2014 SAP AG. All Rights Reserved.