Package org.apache.vinci.transport

Examples of org.apache.vinci.transport.VinciFrame.fadd()


   * @pre service_name != null
   * @pre host_name != null
   */
  static public Transportable composeQuery(String service_name, String host_name) {
    VinciFrame query = new VinciFrame();
    query.fadd(TransportConstants.COMMAND_KEY, VNSConstants.SERVEON_COMMAND);
    query.fadd(VNSConstants.SERVICE_KEY, service_name);
    query.fadd(VNSConstants.HOST_KEY, host_name);
    return query;
  }

View Full Code Here


   * @pre host_name != null
   */
  static public Transportable composeQuery(String service_name, String host_name) {
    VinciFrame query = new VinciFrame();
    query.fadd(TransportConstants.COMMAND_KEY, VNSConstants.SERVEON_COMMAND);
    query.fadd(VNSConstants.SERVICE_KEY, service_name);
    query.fadd(VNSConstants.HOST_KEY, host_name);
    return query;
  }

  /**
 
View Full Code Here

   */
  static public Transportable composeQuery(String service_name, String host_name) {
    VinciFrame query = new VinciFrame();
    query.fadd(TransportConstants.COMMAND_KEY, VNSConstants.SERVEON_COMMAND);
    query.fadd(VNSConstants.SERVICE_KEY, service_name);
    query.fadd(VNSConstants.HOST_KEY, host_name);
    return query;
  }

  /**
   * Set to the port on which the service should be offered.
View Full Code Here

    String command;
    command = in.fgetString("vinci:COMMAND");
    if (command == null) {
      out = new VinciFrame();
      out.fadd("vinci:ERROR", "Malformed request");
      return out;
    }

    try {
      if (VNSConstants.RESOLVE_COMMAND.equals(command)) {
View Full Code Here

        out = getNames(in);
      else if (command.equals(dirCmdGetHits))
        out = getHits(in);
      else {
        out = new VinciFrame();
        out.fadd("vinci:ERROR", "Unrecognized command");
      }
    } catch (Exception e) {
      // Exact translation of the Python code [may not be necessary]
      out = new VinciFrame();
      out
View Full Code Here

        out.fadd("vinci:ERROR", "Unrecognized command");
      }
    } catch (Exception e) {
      // Exact translation of the Python code [may not be necessary]
      out = new VinciFrame();
      out
              .fadd(
                      "vinci:ERROR",
                      "Critical error :\n"
                              + e
                              + "\nThe server MAY not respond to further requests.\nPlease notify the administrator\n");
View Full Code Here

    // Default as specified in SPEC.txt
    if (strip(level) == null || level.trim().toLowerCase().equals("none"))
      level = "-1";
    else if (level.toLowerCase().equals("all")) {
      Debug.p("Specific level must be given (not all)");
      out.fadd("vinci:ERROR", "Specific level must be given (not all)");
      return out;
    }

    synchronized (SR) {
      // Construct a valid number from the level string specified
View Full Code Here

    } else
      servicesList = citem.servicesList;

    if (servicesList == null) {
      Debug.p("Service " + name + " not found");
      out.fadd("vinci:ERROR", "Service " + name + " not found");
      return out;
    }

    Debug.p("Number of services found with name = " + name + ", and level = " + level + " : "
            + servicesList.length);
View Full Code Here

    for (int i = 0; i < v.size(); i++)
      servicesList[i] = (Service) v.get(i);

    if (servicesList == null || servicesList.length == 0) {
      Debug.p("Service " + name + " not found");
      out.fadd("vinci:ERROR", "Service " + name + " not found");
      return out;
    }

    VinciFrame temp;
    for (int j = 0; j < servicesList.length; j++) {
View Full Code Here

    VinciFrame temp;
    for (int j = 0; j < servicesList.length; j++) {
      temp = new VinciFrame();

      temp.fadd("HOST", (String) servicesList[j].getAttr("host"));
      temp.fadd("PORT", "" + servicesList[j].port);
      temp.fadd("INSTANCE", "" + servicesList[j].instance);

      if (servicesList[j].meta) {
        Object o = servicesList[j].dict.get("META");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.