return;
}
protocol.writeCloseSpan(spanAttributes);
ItemsCountAttributes itemsCountAttributes = (ItemsCountAttributes) attributes;
// Prepare Javascript content.
StringWriter scriptWriter = new StringWriter();
// Finally, render the JavaScript part.
scriptWriter.write("Ticker.createItemsCount({");
scriptWriter.write("id:" + createJavaScriptString(spanAttributes.getId()));
if (itemsCountAttributes.getChannel() != null) {
scriptWriter.write(",channel:" + createJavaScriptString(itemsCountAttributes.getChannel()));
}
if (itemsCountAttributes.getRead() != null) {
scriptWriter.write(",read:" + (itemsCountAttributes.getRead().equals("no") ? "false" : "true"));
}
if (itemsCountAttributes.getFollowed() != null) {
scriptWriter.write(",followed:" + (itemsCountAttributes.getFollowed().equals("no") ? "false" : "true"));
}
scriptWriter.write("})");
addUsedFeedPollerId(protocol);