@Override
public void reply(Bot bot, String replyToken, Map<String, Object> obj) {
log.fine("LocalTransport::reply");
log.fine("reply data = " + obj);
ServerSession client = this.clients.get(replyToken);
if (client == null) {
log.warning("LocalTransport::error " +
"sending bot reply client not found");
// TODO send error.
return;
}
HashMap<String, Object> data = new HashMap<String, Object>();
data.put("value", obj);
data.put("topic", replyToken);
data.put("error", false);
log.fine("LocalTransport::reply");
log.fine("payload = " + data);
log.fine("replyToken = " + replyToken);
client.deliver(this.server, "/service/bot/" + this.serviceName +
"/response", data, null);
this.clients.remove(replyToken);
}