StringBuilder data = new StringBuilder();
// if there is a Broadcaster cache, retrieve the messages from the cache, and send them
if (DefaultBroadcaster.class.isAssignableFrom(resource.getBroadcaster().getClass())) {
List<Object> cachedMessages = resource.getBroadcaster().getBroadcasterConfig().getBroadcasterCache()
.retrieveFromCache(resource.getBroadcaster().getID(), resource.uuid());
if (cachedMessages != null && !cachedMessages.isEmpty()) {
if (cachedMessages.size() > 1) {
for (Object object : cachedMessages) {
String msg = object.toString();