com.langner.jmatic2
Interface ITransportListener


public interface ITransportListener

This is the listener interface for ITransport. This interface must be implemented by every application class that wants to be informed about events related to an ITransport protocol connection. There are two functions, one of which informs about receive data, the other about errors that may occur. It is important to note that both functions will be called in the context of a background thread which is definitely not the Java event dispatcher thread. Thus, the usual considerations about calling GUI functions from different threads apply, e.g. you may only call functions marked as thread-safe in the documentation. All other GUI-related tasks should use the functions of javax.swing.SwingUtilites instead.

Version:
2.0
Author:
Langner Communications AG
See Also:
addListener, removeListener
Copyright:
Langner (c) 2001-2005

Method Summary
 void dataReceived(java.lang.Object obj, byte[] data, int length)
          New receive data available.
 void errorOccurred(java.lang.Object obj, ErrorInfo info)
          The connection ist lost.
 

Method Detail

dataReceived

public void dataReceived(java.lang.Object obj,
                         byte[] data,
                         int length)
New receive data available.

Parameters:
obj - denotes the object that triggered this callback.
data - contains the receive data.
length - number of bytes received.

errorOccurred

public void errorOccurred(java.lang.Object obj,
                          ErrorInfo info)
The connection ist lost.

Parameters:
obj - denotes the object that triggered this callback.
info - further information about the nature of the problem may be retrieved with the member functions of the ErrorInfo object.


Copyright © 2001-2005 Langner Communications AG. All Rights Reserved.