Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-.NET | API-Java | Examples | Downloads
page generated on 31.05.2023 - 04:45
Public Member Functions | List of all members
de.desy.tine.client.TAwtAsyncCallback Class Referenceabstract

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

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. More...
 
final String getErrorString ()
 Returns the error string.
 
abstract void onCallback (TLink link)
 Replaces TLinkCallback.callback(). More...
 

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

◆ getLinkStatus()

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

Returns the link status.

Returns

◆ onCallback()

abstract void de.desy.tine.client.TAwtAsyncCallback.onCallback ( TLink  link)
abstract

Replaces TLinkCallback.callback().

This method to be implemented by derived classes.

Parameters
linkThe TLink which fired this callback.

Referenced by de.desy.tine.client.TAwtAsyncCallback.run().


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