@Override public void processMessage(final AbstractMessage message, final DependencyGraphNode<?> sourceNode, final DependencyGraphNode<?> targetNode, final TimeUnit timeunit) { // Ignore internal executions if (sourceNode.equals(targetNode)) { return; } final long responseTime = message.getReceivingExecution().getTout() - message.getReceivingExecution().getTin(); final int convertedResponseTime = (int) DISPLAY_TIMEUNIT.convert(responseTime, timeunit); if (convertedResponseTime > this.threshold) { targetNode.setColor(COLOR); } }
@Override public String toString() { final StringBuilder strBuild = new StringBuilder(); strBuild.append(this.timestamp) .append(' '); if (this.getSendingExecution().getOperation().getId() == Operation.ROOT_OPERATION_ID) { strBuild.append(SystemModelRepository.ROOT_NODE_LABEL); } else { strBuild.append(this.getSendingExecution()); } strBuild.append(" --> "); if (this.getReceivingExecution().getOperation().getId() == Operation.ROOT_OPERATION_ID) { strBuild.append(SystemModelRepository.ROOT_NODE_LABEL); } else { strBuild.append(this.getReceivingExecution()); } return strBuild.toString(); }
@Override public void processMessage(final AbstractMessage message, final DependencyGraphNode<?> sourceNode, final DependencyGraphNode<?> targetNode, final TimeUnit timeunit) { // Ignore internal executions if (sourceNode.equals(targetNode)) { return; } ResponseTimeDecoration timeDecoration = targetNode.getDecoration(ResponseTimeDecoration.class); if (timeDecoration == null) { timeDecoration = new ResponseTimeDecoration(timeunit, this.displayTimeunit); targetNode.addDecoration(timeDecoration); } timeDecoration.registerExecution(message.getReceivingExecution()); }
for (final AbstractMessage me : messages) { final AllocationComponent senderComponent = me.getSendingExecution().getAllocationComponent(); final AllocationComponent receiverComponent = me.getReceivingExecution().getAllocationComponent(); if (!plottedComponentIds.contains(senderComponent.getId())) { ps.print("object(O" + senderComponent.getId() + ",\"" + senderComponent.getExecutionContainer().getName() + "::\",\"" for (final AbstractMessage me : messages) { final AssemblyComponent senderComponent = me.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = me.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); if (!plottedComponentIds.contains(senderComponent.getId())) { ps.print("object(O" + senderComponent.getId() + ",\"\",\"" + SequenceDiagramFilter.assemblyComponentLabel(senderComponent, shortLabels) + "\");" final AllocationComponent receiverComponent = me.getReceivingExecution().getAllocationComponent(); senderDotId = "O" + senderComponent.getId(); receiverDotId = "O" + receiverComponent.getId(); } else if (sdMode == SDModes.ASSEMBLY) { final AssemblyComponent senderComponent = me.getSendingExecution().getAllocationComponent().getAssemblyComponent(); final AssemblyComponent receiverComponent = me.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); senderDotId = "O" + senderComponent.getId(); receiverDotId = "O" + receiverComponent.getId(); final Signature sig = me.getReceivingExecution().getOperation().getSignature(); final StringBuilder msgLabel = new StringBuilder(sig.getName()); msgLabel.append('(');
prevE = poppedCall.getReceivingExecution(); curReturnReceiver = poppedCall.getSendingExecution(); final AbstractMessage m = new SynchronousReplyMessage(prevE.getTout(), prevE, prevE = poppedCall.getReceivingExecution(); curReturnReceiver = poppedCall.getSendingExecution(); final AbstractMessage m = new SynchronousReplyMessage(prevE.getTout(), prevE,
Assert.assertEquals("Sending execution is not root execution", call0_0___root__bookstore_searchBook.getSendingExecution(), SystemModelRepository.ROOT_EXECUTION); Assert.assertEquals(call0_0___root__bookstore_searchBook.getReceivingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals("Message has wrong timestamp", call0_0___root__bookstore_searchBook.getTimestamp(), this.exec0_0__bookstore_searchBook.getTin()); Assert.assertTrue("Message is not a call", call1_1___bookstore_searchBook_catalog_getBook instanceof SynchronousCallMessage); Assert.assertEquals(call1_1___bookstore_searchBook_catalog_getBook.getSendingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals(call1_1___bookstore_searchBook_catalog_getBook.getReceivingExecution(), this.exec1_1__catalog_getBook); Assert.assertEquals("Message has wrong timestamp", call1_1___bookstore_searchBook_catalog_getBook.getTimestamp(), this.exec1_1__catalog_getBook.getTin()); Assert.assertTrue("Message is not a reply", return1_1___catalog_getBook__bookstore_searchBook instanceof SynchronousReplyMessage); Assert.assertEquals(return1_1___catalog_getBook__bookstore_searchBook.getSendingExecution(), this.exec1_1__catalog_getBook); Assert.assertEquals(return1_1___catalog_getBook__bookstore_searchBook.getReceivingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals("Message has wrong timestamp", return1_1___catalog_getBook__bookstore_searchBook.getTimestamp(), this.exec1_1__catalog_getBook.getTout()); Assert.assertTrue("Message is not a call", call2_1___bookstore_searchBook__crm_getOrders instanceof SynchronousCallMessage); Assert.assertEquals(call2_1___bookstore_searchBook__crm_getOrders.getSendingExecution(), this.exec0_0__bookstore_searchBook); Assert.assertEquals(call2_1___bookstore_searchBook__crm_getOrders.getReceivingExecution(), this.exec2_1__crm_getOrders); Assert.assertEquals("Message has wrong timestamp", call2_1___bookstore_searchBook__crm_getOrders.getTimestamp(), this.exec2_1__crm_getOrders.getTin()); Assert.assertTrue("Message is not a call", call3_2___bookstore_searchBook__catalog_getBook instanceof SynchronousCallMessage); Assert.assertEquals(call3_2___bookstore_searchBook__catalog_getBook.getSendingExecution(), this.exec2_1__crm_getOrders); Assert.assertEquals(call3_2___bookstore_searchBook__catalog_getBook.getReceivingExecution(), this.exec3_2__catalog_getBook); Assert.assertEquals("Message has wrong timestamp", call3_2___bookstore_searchBook__catalog_getBook.getTimestamp(), this.exec3_2__catalog_getBook.getTin()); Assert.assertTrue("Message is not a reply", return3_2___catalog_getBook__crm_getOrders instanceof SynchronousReplyMessage);
final AllocationComponent receiverComponent = m.getReceivingExecution().getAllocationComponent(); DependencyGraphNode<AllocationComponent> senderNode = this.getGraph().getNode(senderComponent.getId()); DependencyGraphNode<AllocationComponent> receiverNode = this.getGraph().getNode(receiverComponent.getId()); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
final AllocationComponent receiverComponent = m.getReceivingExecution().getAllocationComponent(); final int rootOperationId = OperationRepository.ROOT_OPERATION.getId(); final Operation senderOperation = m.getSendingExecution().getOperation(); final Operation receiverOperation = m.getReceivingExecution().getOperation(); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
final AssemblyComponent receiverComponent = m.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); DependencyGraphNode<AssemblyComponent> senderNode = this.getGraph().getNode(senderComponent.getId()); DependencyGraphNode<AssemblyComponent> receiverNode = this.getGraph().getNode(receiverComponent.getId()); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
final AssemblyComponent receiverComponent = m.getReceivingExecution().getAllocationComponent().getAssemblyComponent(); final int rootOperationId = OperationRepository.ROOT_OPERATION.getId(); final Operation senderOperation = m.getSendingExecution().getOperation(); final Operation receiverOperation = m.getReceivingExecution().getOperation(); this.getOriginRetentionPolicy()); if (m.getReceivingExecution().isAssumed()) { receiverNode.setAssumed();
final AllocationComponent receiverComponent = m.getReceivingExecution().getAllocationComponent(); final ExecutionContainer senderContainer = senderComponent.getExecutionContainer(); final ExecutionContainer receiverContainer = receiverComponent.getExecutionContainer();