Exemplo n.º 1
0
  private void addServiceProject(String type, Name name) {
    String id = name.getId();
    NameDetailInfo all = m_serviceProjectsInfo.get(ALL_METHOD);

    if (all == null) {
      all = new NameDetailInfo(m_reportDuration, ALL_METHOD, m_remoteIp, type);
      m_serviceProjectsInfo.put(ALL_METHOD, all);
    }
    NameDetailInfo info = m_serviceProjectsInfo.get(id);

    if (info == null) {
      info = new NameDetailInfo(m_reportDuration, name.getId(), m_remoteIp, type);
      m_serviceProjectsInfo.put(id, info);
    }
    info.mergeName(name);
    all.mergeName(name);
  }
Exemplo n.º 2
0
  @Override
  public void visitName(Name name) {
    String role = m_currentRole;

    if (StringUtils.isEmpty(m_query) || isFit(m_query, name.getId())) {
      if (role != null && role.endsWith("Client")) {
        addServiceProject(m_currentType, name);
      } else if (role != null && role.endsWith("Server")) {
        addCallProject(m_currentType, name);
      } else if (role != null && role.endsWith("Caller")) {
        addCallerProject(m_currentType, name);
      }
    }
  }