Package com.sap.conn.jco
Class JCoDestinationManager
java.lang.Object
com.sap.conn.jco.JCoDestinationManager
The JCoDestinationManager creates and manages the destinations used by JCo applications.
The APIs are static and can be invoked directly.
Note: A destination instance may become invalid if the destination configuration
is changed or removed. In such cases the running operation will be finished, but the further usage
of the invalidated destination will be blocked by throwing a JCoException with the key
JCO_ERROR_DESTINATION_DATA_INVALID.
The application may fetch an updated destination instance from JCoDestinationManager, if it is suitable for
the application scenario.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
instantiated by JCo runtime only. -
Method Summary
Modifier and TypeMethodDescriptionstatic JCoDestination
getDestination
(String destinationName) Call this method to get an instance of a destination, on which you need to execute a function module.static JCoDestination
getDestination
(String destinationName, String scopeType) Call this method to get an instance of a destination, on which you need to execute a function module.protected abstract JCoDestination
getDestinationInstance
(String destinationName, String scopeType) Do not use this method.
-
Constructor Details
-
JCoDestinationManager
protected JCoDestinationManager()instantiated by JCo runtime only.
-
-
Method Details
-
getDestinationInstance
protected abstract JCoDestination getDestinationInstance(String destinationName, String scopeType) throws JCoException Do not use this method. Reserved for internal use. UsegetDestination(String)
orgetDestination(String, String)
instead.- Parameters:
destinationName
- the name of the destination for which a JCoDestination instance shall be returnedscopeType
- the name of the scope to which the destination shall belong to- Returns:
- a JCoDestination instance that matches the destination name
- Throws:
JCoException
- if the specified destination does not exist or could not be created
-
getDestination
Call this method to get an instance of a destination, on which you need to execute a function module.- Parameters:
destinationName
- the name of the destination, for which a JCoDestination instance shall be returned- Returns:
- a JCoDestination that matches the destination name.
- Throws:
JCoException
- if the specified destination does not exist or could not be created
-
getDestination
public static JCoDestination getDestination(String destinationName, String scopeType) throws JCoException Call this method to get an instance of a destination, on which you need to execute a function module. The scopeType parameter allows to assign all stateful operations done on this destination to a certain scope in runtime environments that differentiate between several scopes within a session. Whether the runtime environment really supports scopeTypes, depends on the session and/or scope management. Actually, it defines whether scopeTypes are actually needed, and will reflect that in the implementation of the SessionReferenceProvider. If scopeTypes are not supported the parameter scopeType will be ignored and you could always use the methodgetDestination(String destinationName)
. If scopeTypes are supported, the valid scopeTypes are defined by the session management of the runtime environment.- Parameters:
destinationName
- the name of the destination for which a JCoDestination instance shall be returnedscopeType
- the name of the scope to which the destination shall belong to- Returns:
- a JCoDestination instance that matches the destination name.
- Throws:
JCoException
- if the specified destination does not exist or could not be created
-