com.kuka.task
Class RoboticsAPITask

java.lang.Object
  extended by com.kuka.task.RoboticsAPITask
All Implemented Interfaces:
IRoboticsAPITask

public abstract class RoboticsAPITask
extends Object
implements IRoboticsAPITask

Base class for RoboticsAPI tasks.

Provides the most common tools for usage and better integration in the KUKA framework.


Constructor Summary
RoboticsAPITask()
           
 
Method Summary
 void dispose()
          Will be called when the task is about to be disposed, for example if the task is being asked to stop.
 void initialize()
          Will be called when the task is initialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.kuka.task.IRoboticsAPITask
run
 

Constructor Detail

RoboticsAPITask

public RoboticsAPITask()
Method Detail

initialize

public void initialize()
                throws Exception
Description copied from interface: IRoboticsAPITask
Will be called when the task is initialized.

Specified by:
initialize in interface IRoboticsAPITask
Throws:
Exception - any exception. A task is not forced to catch exceptions if it doesn't want to handle it.

dispose

public void dispose()
             throws Exception
Description copied from interface: IRoboticsAPITask
Will be called when the task is about to be disposed, for example if the task is being asked to stop. This method gives the task an opportunity to clean up any resources that are being held (for example, memory, file handles, threads).

This method will be called from a separate thread, and may be called while the task is still initializing or running in a thread parallel to the dispose thread.

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.

Specified by:
dispose in interface IRoboticsAPITask
Throws:
Exception - any exception. A task 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 © 2019. All rights reserved.