use of net.dempsy.container.DeliverResourceJob in project Dempsy by Dempsy.
the class NodeReceiver method propogateMessageToNode.
/**
* This passes the message directly to the current node container(s) listed in the message.
*
* If the message is a resource (and therefore disposition isn't null) there's an assumption that
* the message is "opened" and responsibility for the closing of it is being passed along to propogateMessageToNode
*/
public void propogateMessageToNode(final RoutedMessage message, final boolean justArrived, final MessageResourceManager disposition) {
if (disposition == null) {
final MessageDeliveryJob rejectable = new DefaultDeliverMessageJob(containers, statsCollector, message, justArrived);
if (justArrived)
threadModel.submitLimited(rejectable);
else
threadModel.submit(rejectable);
} else {
final MessageDeliveryJob rejectable = new DeliverResourceJob(containers, statsCollector, message, justArrived, disposition);
if (justArrived)
threadModel.submitLimited(rejectable);
else {
if (message.message.getClass().getSimpleName().equals("ThermalSamplingIntervalByCamera")) {
int i = 0;
i += 13;
dump(i);
}
threadModel.submit(rejectable);
}
}
}
Aggregations