String resourceKey = resource.getKey();
if (requestMap.get(resourceKey) == null) {
requestMap.put(resourceKey, Boolean.TRUE);
QueueRegistry queueRegistry = QueueRegistry.getInstance(context);
if (queueRegistry.isShouldCreateDefaultGlobalQueue()) {
String encodedGlobalQueueName = context.getExternalContext().encodeNamespace(
UIQueue.GLOBAL_QUEUE_NAME);
if (!queueRegistry.containsQueue(encodedGlobalQueueName)) {
queueRegistry.registerQueue(context, encodedGlobalQueueName, null);
}
}
if (queueRegistry.hasQueuesToEncode()) {
super.encode(resource, context, queueRegistry.getRegisteredQueues(context), attributes);
}
}
}