com.interfaceware.chameleon
Interface LlpClientListener


public interface LlpClientListener

The listener interface for receiving LlpClient events. A class that is interested in processing a LlpClient event must implement this interface (and all the methods it contains). The listener object created from that class is then registered with a LlpClient object using the LlpClient's addListener method. When the LlpClient's state changes, the relevant method in the listener object is invoked. If you wish the LlpClient object to stop receiving notifications, use the LlpClient's removeListener method.

See Also:
LlpClient

Method Summary
 void closed()
          Fired when the connection is closed.
 void connected()
          Fired when the connection is made with the server.
 void dataIgnored(java.lang.String Data)
          Fired when data has been received that is not within the header and trailer block.
 void errorReceived(java.lang.String Description, int Code)
          Fired when we have an error with the TCP/IP connection.
 void messageReceived(java.lang.String Message)
          Fired when a message is received.
 

Method Detail

connected

void connected()

Fired when the connection is made with the server.


closed

void closed()

Fired when the connection is closed.


messageReceived

void messageReceived(java.lang.String Message)

Fired when a message is received.

Does not include the HeaderBlock and TrailerBlock characters.

Parameters:
Message - The message received.

dataIgnored

void dataIgnored(java.lang.String Data)

Fired when data has been received that is not within the header and trailer block.

This is for dealing with an incorrect LLP implementation. The data is provided to the user's application through this event. This allows it to be logged since this is likely to be a bad error.

Parameters:
Data - The ignored data.

errorReceived

void errorReceived(java.lang.String Description,
                   int Code)

Fired when we have an error with the TCP/IP connection.

The context of when this is received is often determined by a previous operation. The connection will always be closed once this event is received.

Parameters:
Description - Description of the error.
Code - Error code.