Package org.apache.vinci.transport

Examples of org.apache.vinci.transport.QueryableFrame


    checkError(resp);

    ArrayList A = resp.fget("SERVICE");
    Hashtable H;
    QueryableFrame Q;
    ServiceInterface[] S = new ServiceInterface[A.size()];
    for (int i = 0; i < A.size(); i++) {
      Q = (QueryableFrame) A.get(i);

      // Check if it is a Service or a ServiceAlias and parse accordingly
      if (Q.fgetString("TARGET") == null) {
        H = new Hashtable();
        int total = Q.getKeyValuePairCount();
        KeyValuePair P = null;
        for (int j = 0; j < total; j++) {
          P = Q.getKeyValuePair(j);
          if (P.isValueALeaf()) {
            H.put(P.getKey(), P.getValueAsString());
          } else {
            H.put(P.getKey(), P.getValue());
          }
        }

        S[i] = new Service(H);
      } else {
        S[i] = new ServiceAlias(Q.fgetString("NAME"), Q.fgetString("TARGET"));
      }
    }

    return S;
  }
View Full Code Here


    H.starttime = resp.fgetString("STARTED");
    ArrayList A = resp.fget("HITS");
    H.hits = new int[A.size()];
    H.types = new String[A.size()];

    QueryableFrame Q;
    for (int i = 0; i < H.hits.length; i++) {
      Q = (QueryableFrame) A.get(i);
      H.hits[i] = Q.fgetInt("COUNT");
      H.types[i] = Q.fgetString("TYPE");
    }

    return H;
  }
View Full Code Here

  private ServiceInfo[] constructServiceInfo(ArrayList A, String level, String name) {
    if (level == null)
      level = "-1";

    ServiceInfo[] S = new ServiceInfo[A.size()];
    QueryableFrame L;
    for (int i = 0; i < S.length; i++) {
      L = (QueryableFrame) A.get(i);
      S[i] = new ServiceInfo(name, L.fgetString("HOST"), L.fgetString("PORT"), level, L
              .fgetString("INSTANCE"));
    }

    return S;
  }
View Full Code Here

TOP

Related Classes of org.apache.vinci.transport.QueryableFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.