package gr.ntua.vision.monitoring;

import gr.ntua.vision.monitoring.events.Event;

import java.net.SocketException;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 *
 */
public class VismoClusterHead extends AbstractVismoCloudElement {
    /***/
    private static final Logger log = LoggerFactory.getLogger(VismoClusterHead.class);


    /**
     * @param vminfo
     * @param sink
     * @param sources
     * @throws SocketException
     */
    public VismoClusterHead(final VMInfo vminfo, final EventSink sink, final List<EventSource> sources) throws SocketException {
        super(vminfo, sink, sources);
    }


    /**
     * @see gr.ntua.vision.monitoring.EventListener#receive(gr.ntua.vision.monitoring.events.Event)
     */
    @Override
    public void receive(final Event e) {
        log.trace("received {}", e);
    }
}

@@ -126,17 +126,77 @@
 ava.
-util.List
+net.UnknownHostException;%0Aimport java.util.List;%0Aimport java.util.Map
 ;%0A%0Ai
@@ -376,16 +376,21 @@
 ger log 
+     
 = Logger
@@ -432,16 +432,78 @@
 class);%0A
+    /***/%0A    private static final String DICT_KEY = %22!dict%22;%0A
 %0A%0A    /*
@@ -963,36 +963,266 @@
     
-log.trace(%22received %7B%7D%22, e);
+@SuppressWarnings(%22rawtypes%22)%0A        final Map map = (Map) e.get(DICT_KEY);%0A%0A        try %7B%0A            log.trace(%22received event from %7B%7D: %7B%7D%22, e.originatingIP(), map);%0A        %7D catch (UnknownHostException e1) %7B%0A            log.error(%22error%22, e1);%0A        %7D
 %0A   

trace the event origin