com.kuka.appframework
Interface IAppFwApplication


public interface IAppFwApplication

Interface for an ApplicationFramework application. Implement this interface to create an ApplicationFramework application. For this application to run you will have to create a BlockModel too. The connection between the application and the BlockModel will be done via annotation on the implementing class:

 @AppFwApplicationCategory(model="BlockModel.blm")
 
If the constructor of an implementation fails with an exception, the implementation must make sure that any resource that was allocated in the constructor is closed again. After the instance of the implementation was successfully created, the dispose() method will be called in any case when the application lifecycle ends. The implementation must make sure that the dispose() method properly closes any resource that was allocated.


Method Summary
 void dispose()
          Will be called when the application is about to be disposed, for example if the application is being asked to stop.
 void initialize()
          Will be called when the task is initialized.
 

Method Detail

initialize

void initialize()
                throws Exception
Will be called when the task is initialized.

Throws:
Exception - Any exception. The application is not forced to catch exceptions if it doesn't want to handle it.

dispose

void dispose()
             throws Exception
Will be called when the application is about to be disposed, for example if the application is being asked to stop. This method gives the application an opportunity to clean up any resources that are being held (for example, memory, file handles, threads). The implementation must close all resources that the application has opened, and it must signal all other application threads that might still run that they should stop immediately. The thread calling this method might get interrupted, in which case the implementation should exit this method immediately. The implementation of this method must be thread safe with respect to the other methods in this interface.

Throws:
Exception - Any exception. A application is not forced to catch exceptions if it doesn't want to handle it. Take care however that you properly close any tasks and resources of your application, even if an exception is thrown.


Copyright © 2018. All rights reserved.