use of org.apache.airavata.messaging.core.impl.RabbitMQStatusConsumer in project airavata by apache.
the class Monitor method start.
/**
* @throws MonitorException
*/
public synchronized void start() throws MonitorException {
// Make sure currently we are not doing any monitoring
stop();
// Reset monitoring variables
monitoringCompleted = false;
monitoringFailed = false;
// Notify listeners that the monitoring is about to start
getEventDataRepository().triggerListenerForPreMonitorStart();
try {
// AiravataUtils.setExecutionAsServer();
this.messageClient = new RabbitMQStatusConsumer("amqp://localhost:5672", "airavata_rabbitmq_exchange");
} catch (AiravataException e) {
String msg = "Failed to start the consumer";
logger.error(msg, e);
throw new MonitorException(msg, e);
}
// Enable/disable some menu items and show the monitor panel.
sendSafeEvent(new Event(Event.Type.MONITOR_STARTED));
getEventDataRepository().triggerListenerForPostMonitorStart();
}
Aggregations