Product Information > JADE Object Manager Guide > Chapter 4 - JADE System Instrumentation and Diagnosis > ProcesssendWebStatistics Method

Process::sendWebStatistics Method

sendWebStatistics();

The Process class sendWebStatistics method requests a process to send a notification containing World Wide Web performance statistics. The process is indicated by the Process instance used as the method receiver.

Any current process can be specified, including the requesting process itself and processes executing on other nodes. However, only processes that are using Web services send meaningful data. Other processes send the notification, but it does not contain any values.

The target object for the notification is the Process instance of the process making the request.

The target process is temporarily activated or interrupted in order to send the notification. After sending the notification, it resumes whatever it was previously doing.

This method is asynchronous; that is, the sendWebStatistics method does not wait until the statistics have been received. The statistics are received as a notification some time after the sendWebStatistics method has been called.

The information in the notification relating to the Web performance statistics is shown in the following table.

Parameter Contains …
eventType Process_Web_Stats_Event in the JadeProcessEvents category
target Process instance of the process that made the request
userInfo Statistical values encoded within a Binary value

The process making the request should register to receive type Process_Web_Stats_Event notifications on its Process instance using the beginNotification method defined in the Object class before executing the sendWebStatistics method, as shown in the following code fragment.

self.beginNotification(process, Process_Web_Stats_Event,
                       Response_Continuous, 0);

To test whether a notification contains Web statistics information, the userNotification method of its Process instance should test whether the value of the eventType parameter is Process_Web_Stats_Event, which indicates a Web statistics notification.

The userInfo parameter of the notification should be passed as a parameter to the extractWebStatistics method, to extract the Web statistics as properties in a JadeDynamicObject instance.

If the target process (the method receiver) is not a valid current process, exception 1128 (The target process is not valid) is raised.