Package org.apache.vinci.transport

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


    System.out.println(req.toXML());
    VinciFrame resp = (VinciFrame) transmit(req);

    checkError(resp);

    return constructServiceInfo(resp.fget("SERVER"), resp.fgetString("LEVEL"), name);
  }

  public ServiceInfo[] lookup(String name) {
    return lookup(name, -1, null, null, null);
  }
View Full Code Here


    VinciFrame resp = (VinciFrame) transmit(req);

    checkError(resp);

    ServiceInfo[] S = constructServiceInfo(resp.fget("SERVER"), resp.fgetString("LEVEL"), name);

    return ((S.length > 0) ? S[R.nextInt(S.length)] : null);
  }

  public static void smFrameAdd(VinciFrame v, String tag, String val) {
View Full Code Here

    VinciFrame resp = (VinciFrame) transmit(req);

    checkError(resp);

    ServiceInfo[] S = constructServiceInfo(resp.fget("SERVER"), resp.fgetString("LEVEL"), name);

    return ((S.length > 0) ? S[R.nextInt(S.length)] : null);
  }

  public ServiceInfo resolve(String name) {
View Full Code Here

    checkError(resp);

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

    QueryableFrame Q;
View Full Code Here

    VinciFrame resp = (VinciFrame) transmit(out);

    checkError(resp);

    return (resp.fgetString("STATUS").toLowerCase().trim().equals("ok"));
  }

  // Method to add an alias
  public boolean addAlias(String name, String target) {
    return modifyAlias(VNS.dirCmdAddAlias, name, target);
View Full Code Here

    VinciFrame resp = (VinciFrame) transmit(out);

    checkError(resp);

    return (resp.fgetString("STATUS").toLowerCase().trim().equals("ok"));
  }

  // Method to find out the port to serve on
  public int[] serveon(String name, String host, int level, int instance) {
    if (strip(host) == null || host.trim().toLowerCase().equals("localhost")) {
View Full Code Here

      VinciFrame input = (VinciFrame) in;
      if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
        UIMAFramework.getLogger().log(Level.FINEST, input.toXML());
      }

      String cmd = input.fgetString("vinci:COMMAND");
      if (cmd.equals("shutdown")) {
        if (UIMAFramework.getLogger().isLoggable(Level.INFO)) {
          UIMAFramework.getLogger(this.getClass()).logrb(Level.INFO, this.getClass().getName(),
                  "initialize", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,
                  "UIMA_CPM_deactivating_vns_port__INFO",
View Full Code Here

        else {
          Debug.p("Resolving with VNS: " + S.realhost + ":" + S.port);
          out = BaseClient.rpc(in, S.realhost, S.port);
        }
        System.out.println(out.toXML());
        if (out == null || out instanceof ErrorFrame || strip(out.fgetString("LEVEL")) == null
                || out.fgetString("vinci:ERROR") != null) {
          continue; // Check if resolve actually worked
        }
        return out;
      } catch (ServiceException se) {
View Full Code Here

          Debug.p("Resolving with VNS: " + S.realhost + ":" + S.port);
          out = BaseClient.rpc(in, S.realhost, S.port);
        }
        System.out.println(out.toXML());
        if (out == null || out instanceof ErrorFrame || strip(out.fgetString("LEVEL")) == null
                || out.fgetString("vinci:ERROR") != null) {
          continue; // Check if resolve actually worked
        }
        return out;
      } catch (ServiceException se) {
        // Don't need to worry - caused due to an ErrorFrame as the server was unable to
View Full Code Here

      } else {
        Debug.p("Resolving on workspace " + workspace + " ...");
        out = resolveProxy(in, workspace);
      }

      if (out.fgetString("vinci:ERROR") == null)
        return out;
    }

    Debug.p("Resolution failed");
    return new ErrorFrame("Could not find service " + name + " in default workspaces");
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.