Search in sources :

Example 1 with ListenerDispatcher

use of net.floodlightcontroller.core.util.ListenerDispatcher in project open-kilda by telstra.

the class MockFloodlightProvider method logListeners.

private void logListeners() {
    for (Map.Entry<OFType, ListenerDispatcher<OFType, IOFMessageListener>> entry : listeners.entrySet()) {
        OFType type = entry.getKey();
        ListenerDispatcher<OFType, IOFMessageListener> ldd = entry.getValue();
        StringBuffer sb = new StringBuffer();
        sb.append("OFListeners for ");
        sb.append(type);
        sb.append(": ");
        for (IOFMessageListener l : ldd.getOrderedListeners()) {
            sb.append(l.getName());
            sb.append(",");
        }
        log.debug(sb.toString());
    }
}
Also used : OFType(org.projectfloodlight.openflow.protocol.OFType) IOFMessageListener(net.floodlightcontroller.core.IOFMessageListener) HashMap(java.util.HashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) ListenerDispatcher(net.floodlightcontroller.core.util.ListenerDispatcher)

Example 2 with ListenerDispatcher

use of net.floodlightcontroller.core.util.ListenerDispatcher in project open-kilda by telstra.

the class MockFloodlightProvider method logListeners.

private void logListeners() {
    for (Map.Entry<OFType, ListenerDispatcher<OFType, IOFMessageListener>> entry : listeners.entrySet()) {
        OFType type = entry.getKey();
        ListenerDispatcher<OFType, IOFMessageListener> ldd = entry.getValue();
        StringBuffer sb = new StringBuffer();
        sb.append("OFListeners for ");
        sb.append(type);
        sb.append(": ");
        for (IOFMessageListener l : ldd.getOrderedListeners()) {
            sb.append(l.getName());
            sb.append(",");
        }
        log.debug(sb.toString());
    }
}
Also used : OFType(org.projectfloodlight.openflow.protocol.OFType) IOFMessageListener(net.floodlightcontroller.core.IOFMessageListener) HashMap(java.util.HashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) ListenerDispatcher(net.floodlightcontroller.core.util.ListenerDispatcher)

Aggregations

HashMap (java.util.HashMap)2 Map (java.util.Map)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 ConcurrentMap (java.util.concurrent.ConcurrentMap)2 IOFMessageListener (net.floodlightcontroller.core.IOFMessageListener)2 ListenerDispatcher (net.floodlightcontroller.core.util.ListenerDispatcher)2 OFType (org.projectfloodlight.openflow.protocol.OFType)2