com.sap.conn.jco
Class JCoDestinationManager

java.lang.Object
  extended by com.sap.conn.jco.JCoDestinationManager

public abstract class JCoDestinationManager
extends java.lang.Object

The JCoDestinationManager creates and manages the destinations used by JCo applications. The APIs are static and can be invoked directly.

The destination manager uses the instance of DestinationDataProvider registered with the environment to get the destination properties. In each environment a suitable implementation of DestinationDataProvider has to be registered to ensure an appropriate management of destination properties. The registration is performed with Environment.registerDestinationDataProvider(com.sap.conn.jco.ext.DestinationDataProvider).

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 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.


Method Summary
abstract  java.util.List<java.lang.String> getCustomDestinationIDs(java.lang.String destinationID)
          Deprecated. Might be removed in future versions without further notice. Use JCo.getCustomDestinationIDs(String).
static JCoDestination getDestination(java.lang.String destinationName)
          Call this method to get an instance of a destination, on which you need to execute a function module
static JCoDestination getDestination(java.lang.String destinationName, java.lang.String scopeType)
          Call this method to get an instance of a destination, on which you need to execute a function module.
abstract  java.util.List<java.lang.String> getDestinationIDs()
          Deprecated. Might be removed in future versions without further notice. Use JCo.getDestinationIDs().
abstract  JCoDestination getDestinationInstance(java.lang.String destinationName, java.lang.String scopeType)
          Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use getDestination(String) or getDestination(String, String) instead.
abstract  JCoDestinationMonitor getDestinationMonitor(java.lang.String destinationID)
          Deprecated. Might be removed in future versions without further notice. Use JCo.getDestinationMonitor(String).
abstract  JCoDestinationMonitor getRepositoryDestinationMonitor(java.lang.String destinationID)
          Deprecated. Might be removed in future versions without further notice. Use JCo.getRepositoryDestinationMonitor(String).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDestinationInstance

public abstract JCoDestination getDestinationInstance(java.lang.String destinationName,
                                                      java.lang.String scopeType)
                                               throws JCoException
Deprecated. Reserved for internal use - visibility might be reduced in future versions without further notice. Use getDestination(String) or getDestination(String, String) instead.

Throws:
JCoException

getDestinationIDs

public abstract java.util.List<java.lang.String> getDestinationIDs()
Deprecated. Might be removed in future versions without further notice. Use JCo.getDestinationIDs().


getCustomDestinationIDs

public abstract java.util.List<java.lang.String> getCustomDestinationIDs(java.lang.String destinationID)
Deprecated. Might be removed in future versions without further notice. Use JCo.getCustomDestinationIDs(String).


getDestinationMonitor

public abstract JCoDestinationMonitor getDestinationMonitor(java.lang.String destinationID)
                                                     throws JCoRuntimeException
Deprecated. Might be removed in future versions without further notice. Use JCo.getDestinationMonitor(String).

Throws:
JCoRuntimeException

getRepositoryDestinationMonitor

public abstract JCoDestinationMonitor getRepositoryDestinationMonitor(java.lang.String destinationID)
                                                               throws JCoRuntimeException
Deprecated. Might be removed in future versions without further notice. Use JCo.getRepositoryDestinationMonitor(String).

Throws:
JCoRuntimeException

getDestination

public static JCoDestination getDestination(java.lang.String destinationName)
                                     throws JCoException
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 will be returned
Returns:
a JCoDestination that matches the destination name.
Throws:
JCoException - with the key JCoException.JCO_ERROR_RESOURCE, if the specified destination does not exist
JCoRuntimeException -
  • with the key JCoException.JCO_ERROR_CONFIGURATION, if the destination configuration or environment is not configured properly.
  • with the key JCoException.JCO_ERROR_DATA_PROVIDER_ERROR, if the destination data provider was not able to lookup the destination configuration

getDestination

public static JCoDestination getDestination(java.lang.String destinationName,
                                            java.lang.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 method getDestination(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 will be returned
scopeType - the name of the scope to which the destination should belong to
Returns:
a JCoDestination that matches the destination name.
Throws:
JCoException - with the key JCoException.JCO_ERROR_RESOURCE, if the specified destination does not exist or contains invalid values
See Also:
SessionReferenceProvider


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