The following example is provided by Adobe and included in LCDS (http://www.adobe.com/products/livecycle/dataservices/
). Follow the installation instructions and then start the LCDS server. Then, go to the following URL: http://localhost:8400/lcds-samples/traderdesktop/startfeed.jsp
. This page activates a stock price fluctuation simulation.
The steps involved in the process are:
polling
requestspolling
http://localhost.:8400/lcds-samples/traderdesktop/index.html
polling HTTP
requests through NIO sockets directly handled by LCDS
.my-rtmp
. This corresponds to an operating mode using the RTMP
protocol. Currently NeoLoad does not support this protocol.my-nio-amf-poll
mode corresponds to an operating mode using polling
requests. The average delay between these requests is 3 seconds. This means there will be a minimum 3 second delay between two updates of the Watch List. Please wait twenty seconds or so (in other words, 7 refresh cycles).AMF polling
. Click Finish.UserPolling_AMF
Virtual User from the recorded Virtual User.UserPolling
user contains the raw recording of the requests.UserPolling_AMF
Virtual User, right-click, then select Show all. The polling request appears in the polling_loop
loop under the push_fork
fork.POLL_3
polling request. The flex.samples.marketdata.Stock
message is a Push message executed each time a response message contains a flex.samples.marketdata.Stock
-type object.First, you need to set a Variable Extractor on the Push message to extract the symbol:
flex.samples.marketdata.Stock
Push message, then click Advanced.Create a JavaScript action in messageFork_1
located in the flex.samples.marketdata.Stock
Push message and enter the following JavaScript code: logger.debug("STOCK = "+ context.variableManager.getValue("symbol"));
The JavaScript action will display the stock symbol extracted from the message.
flex.messaging.messages.AcknowledgeMessageExt
and DefaultMessage
Push messages.Several polling
requests and Push messages have been executed. Click on any one of them to check its contents. With a Push message selected, click Response.
The speed of execution in the validation check playback is real; this avoids submitting the server to too high a polling
rate. In testing, 3 seconds minimum separate each polling
request.
NeoLoad allows you to work on an XML representation of the objects passing through the server. In this example, you can see the XML representation of an instance of the example class flex.samples.marketdata.Stock
returned by the server.
<body class="ASObject" mappedClass="flex.samples.marketdata.Stock">
<open tagClass="double">33.61</open>
<last tagClass="double">32.41972272641574</last>
<symbol tagClass="String">GE</symbol>
<name tagClass="String">General Electric Company</name>
...
</body>
Here is an extract of the associated Java class:
package flex.samples.marketdata;
import java.util.Date;
public class Stock {
protected double open;
protected double last;
protected String symbol;
protected String name;
...
public double getOpen() {
return open;
}
public void setOpen(double open) {
this.open = open;
}
public double getLast() {
return last;
}
public void setLast(double last) {
this.last = last;
}
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
polling
.