class Controller implements IFloodlightProviderService, IStorageSourceListener, IInfoProvider {

    @Override
    public void handleOutgoingMessage(IOFSwitch sw, OFMessage m) {
        if (sw == null)
            throw new NullPointerException("Switch must not be null");
        if (m == null)
            throw new NullPointerException("OFMessage must not be null");

        // FIXME floodlight context not supported any more
        FloodlightContext bc = new FloodlightContext();

        List<IOFMessageListener> listeners = null;
        if (messageListeners.containsKey(m.getType())) {
            listeners = messageListeners.get(m.getType()).getOrderedListeners();
        }

        if (listeners != null) {
            for (IOFMessageListener listener : listeners) {
                if (Command.STOP.equals(listener.receive(sw, m, bc))) {
                    break;
                }
            }
        }
    }

}