Deploying Your Application

Your application must include a class with a main method. As an example, we provide the SimpleAbleApp.java which constructs a SimpleAbleAgent and provides a data buffer connection to a SimpleAbleBean.

The AbleFileWatcherCustomizer could also be used as an example of an application since it includes a main method. But, it doesn't allow any of the agent's properties to be saved, nor does it restore a saved agent.

You can save your agent to a file to be restored later like this:

agent.setFileName(path + File.separator + fileName + ".ser");
agent.saveToFile() ;

Here is an example of restoring an agent from a serialized file, and handling any property change listeners that exist:

agent = (AbleAgent)agent.restoreFromFile(path + File.separator + fileName + ".ser") ;
if (currentAgent!= null) currentAgent.removePropertyChangeListener(this);
currentAgent = agent ;
agent.addPropertyChangeListener(this) ;

You would package your java class files in a jar, and distribute that jar as well as any of the Able-dependant jars such as ableall.jar.