package com.quakearts.syshub.test.helper;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

import javax.enterprise.event.Observes;
import javax.enterprise.event.ObservesAsync;
import javax.inject.Singleton;

import com.quakearts.appbase.Main;
import com.quakearts.syshub.agent.event.ProcessingEvent;

@Singleton
public class ErrorObserver {

	private BlockingQueue<Throwable> queue = new ArrayBlockingQueue<>(1);
	
	public BlockingQueue<Throwable> getQueue() {
		return queue;
	}
	
	public void handleProcessingEvent(@ObservesAsync ProcessingEvent event) {
		Main.log.info("Handling "+event.getException().getClass().getName());
		if(event.getAgentConfiguration().getAgentName().equals("ErrorThrowingModule")) {
			try {
				queue.put(event.getException());
			} catch (InterruptedException e) {
			}
		}
	}
}

@@ -132,48 +132,8 @@
 e;%0A%0A
-import javax.enterprise.event.Observes;%0A
 impo

Remove unneeded import