if (!il.getSource().getProperties().containsKey(ServiceGraphLayout.WIDTH)) { if (LOG.isLoggable(Level.FINER)) { LOG.fine("Source node on invocation link with definition '"+il.getSource().getService()+"' does not have layout information"); if (!il.getTarget().getProperties().containsKey(ServiceGraphLayout.WIDTH)) { if (LOG.isLoggable(Level.FINER)) { LOG.fine("Target node on invocation link with definition '"+il.getTarget().getService()+"' does not have layout information"); int x1=(int)(((Integer)il.getSource().getProperties().get(ServiceGraphLayout.X_POSITION) +(Integer)il.getSource().getProperties().get(ServiceGraphLayout.WIDTH)) * ratio); int y1=(int)(((Integer)il.getSource().getProperties().get(ServiceGraphLayout.Y_POSITION) +(Integer)il.getSource().getProperties().get(ServiceGraphLayout.HEIGHT)/2) * ratio); int x2=(int)(((Integer)il.getTarget().getProperties().get(ServiceGraphLayout.X_POSITION)) * ratio); int y2=(int)(((Integer)il.getTarget().getProperties().get(ServiceGraphLayout.Y_POSITION) +(Integer)il.getTarget().getProperties().get(ServiceGraphLayout.HEIGHT)/2) * ratio); line.setAttribute("y2", ""+y2); Severity severity=getInvocationSeverity(il.getInvocations()); String color=getColor(severity); ServiceDependencyBuilder.getMergedMetrics(il.getInvocations()));
InvocationLink il=new InvocationLink(); il.setSource(opn); il.setTarget(topn); il.getInvocations().add(id); existingil.getInvocations().add(id);
/** * This method returns the description to be used for the * invocation link. * * @param il The invocation link * @return The description */ protected String getDescription(InvocationLink il) { return (il.getTarget().getService().getServiceType() +" -> "+il.getTarget().getOperation().getName()); }
/** * This method returns the invocation link associated with the supplied * source and target operation nodes. * * @param source The source * @param target The target * @return The invocation link, or null if not found */ public InvocationLink getInvocationLink(OperationNode source, OperationNode target) { InvocationLink ret=null; for (InvocationLink eil : getInvocationLinks()) { if (eil.getSource() == source && eil.getTarget() == target) { ret = eil; break; } } return (ret); }