use of cbit.vcell.message.VCDestination in project vcell by virtualcell.
the class SimulationControllerImpl method onWorkerEvent.
/**
* Insert the method's description here.
* Creation date: (3/11/2004 10:44:18 AM)
* @param newJobStatus cbit.vcell.messaging.db.SimulationJobStatus
* @param progress java.lang.Double
* @param timePoint java.lang.Double
*/
public void onWorkerEvent(WorkerEvent workerEvent) {
try {
LocalVCMessageListener localVCMessageListener = new LocalVCMessageListener() {
public void onLocalVCMessage(VCDestination destination, VCMessage objectMessage) {
if (destination == VCellTopic.ClientStatusTopic && objectMessage.getObjectContent() instanceof SimulationJobStatus) {
onClientStatusTopic_SimulationJobStatus(objectMessage);
} else {
throw new RuntimeException("SimulationControllerImpl.onWorkerEvent().localMessageListener:: expecting object message with SimulationJobStatus to topic " + VCellTopic.ClientStatusTopic.getName() + ": received \"" + objectMessage.show() + "\"");
}
}
};
LocalVCMessageAdapter vcMessageSession = new LocalVCMessageAdapter(localVCMessageListener);
simulationDispatcherEngine.onWorkerEvent(workerEvent, simulationDatabase, vcMessageSession);
vcMessageSession.deliverAll();
} catch (Exception e) {
lg.error(e.getMessage(), e);
}
}
Aggregations