@Test public void addShouldRegisterCloseListenerWhenItIsMissing() { given(commandContext.hasCloseListener(MessageProducerCommandContextCloseListener.class)).willReturn(false); eventsAggregator.add(event); verify(commandContext).addCloseListener(closeListener); }
@Override public void add(CloudRuntimeEvent<?, ?> element) { CommandContext commandContext = getCurrentCommandContext(); String executionId = resolveExecutionId(element); ExecutionContext executionContext = resolveExecutionContext(commandContext, executionId); if(executionContext != null) { ExecutionContextInfoAppender executionContextInfoAppender = createExecutionContextInfoAppender(executionContext); CloudRuntimeEventImpl<?,?> event = CloudRuntimeEventImpl.class.cast(element); element = executionContextInfoAppender.appendExecutionContextInfoTo(event); } super.add(element); }
ProcessEngineEventsAggregator extends BaseCommandContextEventsAggregator<CloudRuntimeEvent<?,?>, MessageProducerCommandContextCloseListener> { @Override public void add(CloudRuntimeEvent<?, ?> element) { CommandContext commandContext = getCurrentCommandContext(); String executionId = resolveExecutionId(element); ExecutionContext executionContext = resolveExecutionContext(commandContext, executionId); if(executionContext != null) { ExecutionContextInfoAppender executionContextInfoAppender = createExecutionContextInfoAppender(executionContext); CloudRuntimeEventImpl<?,?> event = CloudRuntimeEventImpl.class.cast(element); element = executionContextInfoAppender.appendExecutionContextInfoTo(event); } super.add(element); } }
ProcessEngineEventsAggregator extends BaseCommandContextEventsAggregator<CloudRuntimeEvent<?,?>, MessageProducerCommandContextCloseListener> { @Override public void add(CloudRuntimeEvent<?, ?> element) { CommandContext commandContext = getCurrentCommandContext(); String executionId = resolveExecutionId(element); ExecutionContext executionContext = resolveExecutionContext(commandContext, executionId); if(executionContext != null) { ExecutionContextInfoAppender executionContextInfoAppender = createExecutionContextInfoAppender(executionContext); CloudRuntimeEventImpl<?,?> event = CloudRuntimeEventImpl.class.cast(element); element = executionContextInfoAppender.appendExecutionContextInfoTo(event); } super.add(element); } ProcessEngineEventsAggregator(MessageProducerCommandContextCloseListener closeListener); }
ProcessEngineEventsAggregator extends BaseCommandContextEventsAggregator<CloudRuntimeEvent<?,?>, MessageProducerCommandContextCloseListener> { @Override public void add(CloudRuntimeEvent<?, ?> element) { CommandContext commandContext = getCurrentCommandContext(); String executionId = resolveExecutionId(element); ExecutionContext executionContext = resolveExecutionContext(commandContext, executionId); if(executionContext != null) { ExecutionContextInfoAppender executionContextInfoAppender = createExecutionContextInfoAppender(executionContext); CloudRuntimeEventImpl<?,?> event = CloudRuntimeEventImpl.class.cast(element); element = executionContextInfoAppender.appendExecutionContextInfoTo(event); } super.add(element); } ProcessEngineEventsAggregator(MessageProducerCommandContextCloseListener closeListener); @Override void add(CloudRuntimeEvent<?, ?> element); }
ProcessEngineEventsAggregator extends BaseCommandContextEventsAggregator<CloudRuntimeEvent<?,?>, MessageProducerCommandContextCloseListener> { @Override public void add(CloudRuntimeEvent<?, ?> element) { CommandContext commandContext = getCurrentCommandContext(); String executionId = resolveExecutionId(element); ExecutionContext executionContext = resolveExecutionContext(commandContext, executionId); if(executionContext != null) { ExecutionContextInfoAppender executionContextInfoAppender = createExecutionContextInfoAppender(executionContext); CloudRuntimeEventImpl<?,?> event = CloudRuntimeEventImpl.class.cast(element); element = executionContextInfoAppender.appendExecutionContextInfoTo(event); } super.add(element); } ProcessEngineEventsAggregator(MessageProducerCommandContextCloseListener closeListener); @Override void add(CloudRuntimeEvent<?, ?> element);  }