com.sap.conn.jco.ext
Interface DestinationDataEventListener


public interface DestinationDataEventListener

The DestinationDataEventListener interface reacts on the events that a DestinationDataProvider could fire if the destination configuration was changed. Events allow to improve the performance and resource management in JCo destination management. If a destination data provider claims to support the events, JCo actually relies on them and does no longer check the properties for changes when accessing a destination, i.e. if there is no event JCo assumes that the properties for the destination haven't changed.

If the DestinationDataProvider implementation is not able to support the events, JCo retrieves the destination configuration each time it is requested although the JCo runtime already knows the destination configuration. Then the destination configuration will be compared with the cached one as if an update event had occurred. If the data retrieved from the DestinationDataProvider is different from the cached data, JCo replaces the cached data with the new configuration data.

Note: Implementation for this interface is provided by JCo runtime. If DestinationDataProvider returns true from supportsEvents(), JCo registers the implementation for this interface via setDestinationDataEventListener() API.

See Also:
DestinationDataProvider

Method Summary
 void deleted(java.lang.String destinationName)
          This event needs to be fired, if a destination was deleted from the destination repository.
 void updated(java.lang.String destinationName)
          This event needs to be fired, if a destination configuration was updated.
 

Method Detail

deleted

void deleted(java.lang.String destinationName)
This event needs to be fired, if a destination was deleted from the destination repository. As a consequence, JCo will delete all idle connections and pools based on this destination and will thus free resources. An existing destination instance will be marked as invalid and is no longer usable.

Parameters:
destinationName - name of the destination that has been deleted

updated

void updated(java.lang.String destinationName)
This event needs to be fired, if a destination configuration was updated. As a consequence, JCo will adjust all relevant objects to the new settings for the destination, if necessary. Important note: the event needs to be fired *after* the destination has been updated, i.e. an invocation to getDestinationProperties() will already return the updated information. If the destination data provider does adjust settings that change e.g. the identification of the target system or the associated user, such as application server host, message server host, SAP system ID, credentials, language and some more, a new destination instance will be created. The outdated instance will be marked as invalid and is no longer usable. Any further attempt to use the old instance (if you, for example, try to execute a function and pass such an invalid destination instance to the execute method) will lead to an exception. Simply retrieve a new instance from the JCoDestinationManager in such a case. Pool related settings can be adjusted without the destination instance being marked as invalid.

Parameters:
destinationName - name of the destination that has been changed
See Also:
JCoDestination.isValid()


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