private void onUpdate(Object handle, String key, ClientsRateRow rates) {
// An update was received from the feed
// Check for late calls
// if (isSubscribed(handle)) {
// Create a new HashMap instance that will represent the update
HashMap<String, String> update = new HashMap<String, String>();
// We have to set the key
update.put("key", key);
// The UPDATE command
update.put("command", "UPDATE");
// And the new quantity value
update.put("desc", rates.getCom_name());
update.put("bid", rates.getBuying_rate());
update.put("ask", rates.getSelling_rate());
update.put("low", rates.getLow_rate());
update.put("high", rates.getHigh_rate());
update.put("delivery", rates.getDelivery());
update.put("retail_rate", rates.getRetail_rate());
update.put("comweight", rates.getCom_weight());
update.put("comid", rates.getCom_id());
update.put("order", rates.getCom_order());
// Pass everything to the kernel
// listener.smartUpdate(handle, update, false);
listener.update("Item", update, false);
// }
}
Bookmarks