Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-VB/ActiveX | API-Java | Examples | Downloads
Public Member Functions
de.desy.tine.client.TAwtAsyncCallback Class Reference

A TLink callback which is executed asynchronously on the AWT event dispatching thread. More...

Inheritance diagram for de.desy.tine.client.TAwtAsyncCallback:
de.desy.tine.client.TLinkCallback

List of all members.

Public Member Functions

final void callback (TLink link)
 The original TINE callback method.
final void run ()
 Called from the AWT event thread.
final int getLinkStatus ()
 Returns the link status.
final String getErrorString ()
 Returns the error string.
abstract void onCallback (TLink link)
 Replaces TLinkCallback.callback().

Detailed Description

A TLink callback which is executed asynchronously on the AWT event dispatching thread.

This callback is useful for programs with an AWT or Swing GUI. It is not advisable to make any GUI modifications directly from TLinkCallback.callback(), since different threads are involved. An indirection via the AWT event queue has to be implemented.

This class simplifies GUI callbacks for client programmers. The programmer simply replaces TLinkCallback with TAwtSyncCallback and implements onCallback() instead of callback. From onCallback(), GUI components can be accessed safely.

In this class, the inherited TINE callback() method calls SwingUtilities.invokeLater() and returns. The AWT event dispatcher calls onCallback() later.

Warning: onCallback() has the original TLink as a parameter. It cannot be guaranteed that TLink is still in its original state when this method is called. If this is required, better use TAwtSyncCallback. However, the original link status and error message are saved and can be accessed with the methods getLinkStatus() and getErrorString().

Author:
jwlg

Member Function Documentation

final int de.desy.tine.client.TAwtAsyncCallback.getLinkStatus ( )

Returns the link status.

Returns:
abstract void de.desy.tine.client.TAwtAsyncCallback.onCallback ( TLink  link) [pure virtual]

Replaces TLinkCallback.callback().

This method to be implemented by derived classes.

Parameters:
linkThe TLink which fired this callback.

The documentation for this class was generated from the following file: