com.haley.haleyrules
Interface ConfigurationListener


public interface ConfigurationListener

ConfigurationListener defines an interface to be implemented by application objects that receive a callback when a KnowledgeBase automatically reloads a configuration.

See Also:
KnowledgeBase.loadConfigurationFile(java.lang.String, long, com.haley.haleyrules.ConfigurationListener), KnowledgeBase.loadConfigurationURL(java.net.URL, long, com.haley.haleyrules.ConfigurationListener)

Field Summary
static int kbisPostLoad
           
static int kbisWaitingToClearAndLoad
           
static int kbisWaitingToLoadWithoutClearing
           
 
Method Summary
 boolean processUpdate(int state)
          This method is called when a running knowledge base is about to (re)load an application from a configuration file.
 

Field Detail

kbisWaitingToLoadWithoutClearing

public static final int kbisWaitingToLoadWithoutClearing
See Also:
Constant Field Values

kbisWaitingToClearAndLoad

public static final int kbisWaitingToClearAndLoad
See Also:
Constant Field Values

kbisPostLoad

public static final int kbisPostLoad
See Also:
Constant Field Values
Method Detail

processUpdate

public boolean processUpdate(int state)
                      throws EclipseException
This method is called when a running knowledge base is about to (re)load an application from a configuration file. Since working memories must be deleted before a load occurs, this listener gives user's application a chance to terminate running working memories and to save data stored in working memories, if needed. If the user wants to prevent automatic update of the configuration, they should return false.

Parameters:
state - An int with the value of either kbisWaitingToLoadWithoutClearing, kbisWaitingToClearAndLoad, or kbisPostLoad .
Returns:
true if it is OK to reload the application.
Throws:
EclipseException - if there is an error
See Also:
KnowledgeBase.loadConfigurationFile(String,long,ConfigurationListener)


Copyright © 1998-2006 Haley Systems, Inc. All Rights Reserved.