public MessageHandler createMessageHandler(Message message, NotificationContext changeContext) { String msgType = message.getMsgType().toString(); MsgHandlerFactoryRegistryItem item = _hdlrFtyRegistry.get(msgType); // Fail to find a MessageHandlerFactory for the message // we will keep the message and the message will be handled when // the corresponding MessageHandlerFactory is registered if (item == null) { LOG.warn("Fail to find message handler factory for type: " + msgType + " msgId: " + message.getMsgId()); return null; } MessageHandlerFactory handlerFactory = item.factory(); // pass the executor to msg-handler since batch-msg-handler needs task-executor to schedule // sub-msgs changeContext.add(MapKey.TASK_EXECUTOR.toString(), this); return handlerFactory.createHandler(message, changeContext); }
public MessageHandler createMessageHandler(Message message, NotificationContext changeContext) { String msgType = message.getMsgType().toString(); MsgHandlerFactoryRegistryItem item = _hdlrFtyRegistry.get(msgType); // Fail to find a MessageHandlerFactory for the message // we will keep the message and the message will be handled when // the corresponding MessageHandlerFactory is registered if (item == null) { LOG.warn("Fail to find message handler factory for type: " + msgType + " msgId: " + message.getMsgId()); return null; } MessageHandlerFactory handlerFactory = item.factory(); // pass the executor to msg-handler since batch-msg-handler needs task-executor to schedule // sub-msgs changeContext.add(MapKey.TASK_EXECUTOR.toString(), this); return handlerFactory.createHandler(message, changeContext); }
_notificationContext.add(MapKey.HELIX_TASK_RESULT.toString(), result); postHandleMessage();
_notificationContext.add(MapKey.HELIX_TASK_RESULT.toString(), result); postHandleMessage();
context.add(MapKey.HELIX_TASK_RESULT.toString(), taskResult); postHandleMessage();
context.add(MapKey.HELIX_TASK_RESULT.toString(), taskResult); postHandleMessage();
_notificationContext.add(MapKey.CURRENT_STATE_UPDATE.toString(), new ConcurrentHashMap<String, CurrentStateUpdate>());
_notificationContext.add(MapKey.CURRENT_STATE_UPDATE.toString(), new ConcurrentHashMap<String, CurrentStateUpdate>());