+ LOG.debug("init");
+
+ messageTranslators = new ConcurrentHashMap<>();
+ popListeners = new ConcurrentHashMap<>();
+ //TODO: move registration to factory
+ addMessageTranslator(ErrorMessage.class, OF10, new ErrorV10Translator());
+ addMessageTranslator(ErrorMessage.class, OF13, new ErrorTranslator());
+ addMessageTranslator(FlowRemovedMessage.class, OF10, new FlowRemovedTranslator(convertorExecutor));
+ addMessageTranslator(FlowRemovedMessage.class, OF13, new FlowRemovedTranslator(convertorExecutor));
+ addMessageTranslator(PacketInMessage.class,OF10, new PacketInV10Translator());
+ addMessageTranslator(PacketInMessage.class,OF13, new PacketInTranslator(convertorExecutor));
+ addMessageTranslator(PortStatusMessage.class,OF10, new PortStatusMessageToNodeConnectorUpdatedTranslator());
+ addMessageTranslator(PortStatusMessage.class,OF13, new PortStatusMessageToNodeConnectorUpdatedTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF13,new MultiPartReplyPortToNodeConnectorUpdatedTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF10, new MultiPartMessageDescToNodeUpdatedTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF13, new MultiPartMessageDescToNodeUpdatedTranslator());
+ addMessageTranslator(ExperimenterMessage.class, OF10, new ExperimenterTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF10, new MultipartReplyTranslator(convertorExecutor));
+ addMessageTranslator(MultipartReplyMessage.class,OF13, new MultipartReplyTranslator(convertorExecutor));
+ addMessageTranslator(MultipartReplyMessage.class,OF13,new MultipartReplyTableFeaturesToTableUpdatedTranslator(convertorExecutor));
+ addMessageTranslator(GetFeaturesOutput.class,OF10, new FeaturesV10ToNodeConnectorUpdatedTranslator());
+ addMessageTranslator(NotificationQueueWrapper.class, OF10, new NotificationPlainTranslator());
+ addMessageTranslator(NotificationQueueWrapper.class, OF13, new NotificationPlainTranslator());
+
+ NotificationPopListener<DataObject> notificationPopListener = new NotificationPopListener<DataObject>();
+ notificationPopListener.setNotificationProviderService(
+ OFSessionUtil.getSessionManager().getNotificationProviderService());
+ notificationPopListener.setMessageSpy(messageSpyCounter);
+
+ //TODO: move registration to factory
+ addMessagePopListener(NodeErrorNotification.class, notificationPopListener);
+ addMessagePopListener(BadActionErrorNotification.class, notificationPopListener);
+ addMessagePopListener(BadInstructionErrorNotification.class, notificationPopListener);
+ addMessagePopListener(BadMatchErrorNotification.class, notificationPopListener);
+ addMessagePopListener(BadRequestErrorNotification.class, notificationPopListener);
+ addMessagePopListener(ExperimenterErrorNotification.class, notificationPopListener);
+ addMessagePopListener(FlowModErrorNotification.class, notificationPopListener);
+ addMessagePopListener(GroupModErrorNotification.class, notificationPopListener);
+ addMessagePopListener(HelloFailedErrorNotification.class, notificationPopListener);
+ addMessagePopListener(MeterModErrorNotification.class, notificationPopListener);
+ addMessagePopListener(PortModErrorNotification.class, notificationPopListener);
+ addMessagePopListener(QueueOpErrorNotification.class, notificationPopListener);
+ addMessagePopListener(RoleRequestErrorNotification.class, notificationPopListener);
+ addMessagePopListener(SwitchConfigErrorNotification.class, notificationPopListener);
+ addMessagePopListener(TableFeaturesErrorNotification.class, notificationPopListener);
+ addMessagePopListener(TableModErrorNotification.class, notificationPopListener);
+ addMessagePopListener(NodeConnectorUpdated.class,notificationPopListener);
+ addMessagePopListener(NodeConnectorRemoved.class,notificationPopListener);
+ addMessagePopListener(PacketReceived.class,notificationPopListener);
+ addMessagePopListener(TransmitPacketInput.class, notificationPopListener);
+ addMessagePopListener(NodeUpdated.class, notificationPopListener);
+ addMessagePopListener(NodeRemoved.class, notificationPopListener);
+
+ addMessagePopListener(SwitchFlowRemoved.class, notificationPopListener);
+ addMessagePopListener(TableUpdated.class, notificationPopListener);
+
+ //Notification registration for flow statistics
+ addMessagePopListener(FlowsStatisticsUpdate.class, notificationPopListener);
+ addMessagePopListener(AggregateFlowStatisticsUpdate.class, notificationPopListener);
+
+ //Notification registrations for group-statistics
+ addMessagePopListener(GroupStatisticsUpdated.class, notificationPopListener);
+ addMessagePopListener(GroupFeaturesUpdated.class, notificationPopListener);
+ addMessagePopListener(GroupDescStatsUpdated.class, notificationPopListener);
+
+ //Notification registrations for meter-statistics
+ addMessagePopListener(MeterStatisticsUpdated.class, notificationPopListener);
+ addMessagePopListener(MeterConfigStatsUpdated.class, notificationPopListener);
+ addMessagePopListener(MeterFeaturesUpdated.class, notificationPopListener);
+
+ //Notification registration for port-statistics
+ addMessagePopListener(NodeConnectorStatisticsUpdate.class, notificationPopListener);
+
+ //Notification registration for flow-table statistics
+ addMessagePopListener(FlowTableStatisticsUpdate.class, notificationPopListener);
+
+ //Notification registration for queue-statistics
+ addMessagePopListener(QueueStatisticsUpdate.class, notificationPopListener);
+