onSuccess

onSuccess — a virtual method invoked on receipt of a success message.

Syntax

For C++:

virtual void onSuccess(LPCTSTR  cmd,
 LPCTSTR  parms);

For Java and C#:

virtual void onSuccess(String  cmd,
 String  parms);

Parameters

cmd

The original command sent to the DataHub to which this reply corresponds.

parms

The list of parameters sent as part of the command, as a single space-separated string, or NULL[13] if none are returned. If the command involved multiple parameters, the list may be truncated.

Description

This virtual method is invoked on receipt of a success message. When a client sends a command to the DataHub, the DataHub will respond with one of:

    information appropriate to the command

    a success message

    a failure message

If a command succeeds, the DataHub will either respond with information appropriate to the command, or it will send a success message if no information should be returned. If a command fails, the DataHub will always respond with a failure message.

A client has the choice of whether to receive the success messages. Commonly you don't want to expend the bandwidth by receiving success messages for every message you send to the DataHub. A client can turn on and off the success messages by emitting the DataHub command (acksuccess 0|1). This command does not have an associated API function wrapper, so you have to emit it using the sendLispMessage command, like this:

  connection.sendLispMessage (true, "(acksuccess 1)");
[Note]

The exact syntax of the call depends on whether you are using C++, .Net or Java.

See Also

onStatusChange, onAsyncMessage, onError, onConnectionSuccess, onConnectionFailure



[13] null in Java and C#.