- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.addPair()
方法的一些代码示例,展示了WilmaSequence.addPair()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WilmaSequence.addPair()
方法的具体详情如下:
包路径:com.epam.wilma.domain.sequence.WilmaSequence
类名称:WilmaSequence
方法名:addPair
[英]Put a WilmaHttpRequestResponsePair into messageStore.
[中]在messageStore里放一张Wilmahtt的前传。
代码示例来源:origin: epam/Wilma
private void appendSequence(final String sequenceKey, final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor) {
WilmaSequence sequence = sequenceDescriptor.getSequence(sequenceKey);
if (sequence != null) {
String loggerId = request.getWilmaMessageId();
RequestResponsePair pair = new RequestResponsePair(requestCloner.cloneRequest(request));
sequence.setTimeout(new Timestamp(dateProvider.getCurrentTimeInMillis() + sequenceDescriptor.getDefaultTimeout()));
sequence.addPair(loggerId, pair);
}
}
代码示例来源:origin: epam/Wilma
@Test
public void testCheckRequestShouldAppendRequestToAnExistingSequence() {
//GIVEN
String sequenceKeyFirst = "testKey1";
Map<String, WilmaSequence> sequences = new ConcurrentHashMap<>();
sequences.put(sequenceKeyFirst, sequenceFirst);
given(sequenceEvaluator.evaluate(request, sequenceDescriptor)).willReturn(true);
given(sequenceDescriptor.getSequences()).willReturn(sequences);
given(handler.getExistingSequence(request, sequences, null)).willReturn(sequenceKeyFirst);
given(sequenceDescriptor.getSequence(sequenceKeyFirst)).willReturn(sequenceFirst);
given(request.getWilmaMessageId()).willReturn("TestLoggerId");
given(sequenceIdUtil.createSequenceId(sequenceKeyFirst, sequenceDescriptor)).willReturn("newID");
given(request.getSequenceId()).willReturn(null);
given(headerUtil.createSequenceHeader(null, "newID")).willReturn("newID");
//WHEN
underTest.checkRequest(request, sequenceDescriptor);
//THEN
verify(sequenceFirst).setTimeout(Mockito.any(Timestamp.class));
verify(sequenceFirst).addPair(Mockito.eq("TestLoggerId"), Mockito.any(RequestResponsePair.class));
verify(request).addSequenceId("newID");
}
本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.setTimeout()方法的一些代码示例,展示了WilmaSequence.setTim
本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.addPair()方法的一些代码示例,展示了WilmaSequence.addPair()
本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.getPairs()方法的一些代码示例,展示了WilmaSequence.getPairs
本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.getSequenceKey()方法的一些代码示例,展示了WilmaSequence.ge
本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.checkIfAllResponsesArrived()方法的一些代码示例,展示了Wilm
本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.isExpired()方法的一些代码示例,展示了WilmaSequence.isExpir
我是一名优秀的程序员,十分优秀!