com.lightstreamer.ls_client
Interface SendMessageListener


public interface SendMessageListener

Receives notifications of server responses to sent messages. All notifications are sent in sequence on a dedicated thread.


Method Summary
 void onAbort(MessageInfo originalMessage, int prog, java.lang.Exception problem)
          Notification that the outcome of a sent message will not be received.
 void onError(int code, java.lang.String error, MessageInfo originalMessage, int prog)
          Notification of an error which prevents the correct handling of a Message sent through LSClient.sendMessage(MessageInfo,SendMessageListener) from being accomplished.
 void onProcessed(MessageInfo originalMessage, int prog)
          Notification of the successful processing of a sent message
 

Method Detail

onError

void onError(int code,
             java.lang.String error,
             MessageInfo originalMessage,
             int prog)
Notification of an error which prevents the correct handling of a Message sent through LSClient.sendMessage(MessageInfo,SendMessageListener) from being accomplished.

Parameters:
code - the error code returned by the Server. See the asynchronous Send Message outcome messages on the text protocol documentation for a reference on the error codes that can be issued in response to a sendMessage request. Note that code 39 is not used in this case.
error - the error message describing the error, as received from the Server.
originalMessage - the original message sent to the server as it was supplied to the LSClient.sendMessage(MessageInfo,SendMessageListener) method.
prog - the progressive number associated to the message as it was returned by the LSClient.sendMessage(MessageInfo,SendMessageListener) method.

onAbort

void onAbort(MessageInfo originalMessage,
             int prog,
             java.lang.Exception problem)
Notification that the outcome of a sent message will not be received. Typically, this happens when the session is being closed. In this case, the client has no way of knowing the processing outcome and any outcome is possible.

Parameters:
originalMessage - the original message sent to the server as it was supplied to the LSClient.sendMessage(MessageInfo,SendMessageListener) method.
prog - the progressive number associated to the message as it was returned by the LSClient.sendMessage(MessageInfo,SendMessageListener) method.
problem - the reason that made the request to be aborted, it may be null.

onProcessed

void onProcessed(MessageInfo originalMessage,
                 int prog)
Notification of the successful processing of a sent message

Parameters:
originalMessage - the original message sent to the server as it was supplied to the LSClient.sendMessage(MessageInfo,SendMessageListener) method.
prog - the progressive number associated to the message as it was returned by the LSClient.sendMessage(MessageInfo,SendMessageListener) method.