com.sap.conn.jco.ext
Interface ServerDataEventListener


public interface ServerDataEventListener

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

If the ServerDataProvider implementation is not able to support the events, JCo retrieves the server configuration each time it is requested although the JCo runtime already knows the server configuration. Then the server configuration will be compared with the cached one as if an update event had occurred. If the data retrieved from the ServerDataProvider 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 ServerDataProvider returns true from supportsEvents(), JCo registers the implementation for this interface via setServerDataEventListener() API.

See Also:
ServerDataProvider

Method Summary
 void deleted(java.lang.String serverName)
          This event needs to be fired, if a server configuration was deleted.
 void updated(java.lang.String serverName)
          This event needs to be fired, if a server configuration was updated.
 

Method Detail

deleted

void deleted(java.lang.String serverName)
This event needs to be fired, if a server configuration was deleted. As a consequence, JCo will disconnect all idle connections and release all allocated resources related to this server. An existing server instance will be marked as invalid and is no longer usable.

Parameters:
serverName - name of the server configuration that has been deleted

updated

void updated(java.lang.String serverName)
This event needs to be fired, if a server configuration was updated. As a consequence, JCo will adjust all relevant objects to the new settings for the server configuration, if necessary. It will try to keep the state of the server, if possible, e.g. if the server was running before it should be running afterwards as well. If the server data provider does adjust settings that change e.g. the identification of the server, such as gateway host, service or program ID, a new server instance will be created and the old instance will be marked as invalid and is no longer usable.
If the update leads to a configuration error, the JCoServer will be stopped completely, and needs to be started again via the start() method on the latest instance after another configuration update was done. It will not start automatically again.

Parameters:
serverName - name of the server configuration that has been changed
See Also:
JCoServer.isValid()


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