Package org.apache.vinci.transport

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


      // Add Vinci Command, so that the receiving service knows what to do
      queryFrame.fadd("vinci:COMMAND", Constants.GET_SUPPORTED_XCAS_VERSIONS);

      // make RPC call
      VinciFrame resultFrame = mVinciClient.rpc(queryFrame);
      String result = resultFrame.fgetString("Result");
      if (result != null) {
        String[] versions = result.split("\\s+");
        return Collections.unmodifiableList(Arrays.asList(versions));
      }
      else {
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

    VinciFrame service = in.fgetVinciFrame("SERVICE");

    boolean ok = true;

    if (service.fgetString("NAME") == null || service.fgetString("TARGET") == null)
      getFrame(false, "Malformed request");
    else {
      synchronized (SR) {
        ok = SR
                .addAlias(new ServiceAlias(service.fgetString("NAME"), service.fgetString("TARGET")));
View Full Code Here

    VinciFrame service = in.fgetVinciFrame("SERVICE");

    boolean ok = true;

    if (service.fgetString("NAME") == null || service.fgetString("TARGET") == null)
      getFrame(false, "Malformed request");
    else {
      synchronized (SR) {
        ok = SR
                .addAlias(new ServiceAlias(service.fgetString("NAME"), service.fgetString("TARGET")));
View Full Code Here

    if (service.fgetString("NAME") == null || service.fgetString("TARGET") == null)
      getFrame(false, "Malformed request");
    else {
      synchronized (SR) {
        ok = SR
                .addAlias(new ServiceAlias(service.fgetString("NAME"), service.fgetString("TARGET")));
      }
    }

    return getFrame(ok, "Add alias request failed");
  }
View Full Code Here

    if (service.fgetString("NAME") == null || service.fgetString("TARGET") == null)
      getFrame(false, "Malformed request");
    else {
      synchronized (SR) {
        ok = SR
                .addAlias(new ServiceAlias(service.fgetString("NAME"), service.fgetString("TARGET")));
      }
    }

    return getFrame(ok, "Add alias request failed");
  }
View Full Code Here

  VinciFrame delAlias(VinciFrame in) {
    logRequest(dirCmdDelAlias, in.fgetString("vinci:REMOTEIP"), null);
    VinciFrame service = in.fgetVinciFrame("SERVICE");
    boolean ok = true;
    if (service.fgetString("NAME") == null || service.fgetString("TARGET") == null) {
      getFrame(false, "Malformed request");
    } else {
      synchronized (SR) {
        ok = SR.delAlias(service.fgetString("NAME"));
      }
View Full Code Here

  VinciFrame delAlias(VinciFrame in) {
    logRequest(dirCmdDelAlias, in.fgetString("vinci:REMOTEIP"), null);
    VinciFrame service = in.fgetVinciFrame("SERVICE");
    boolean ok = true;
    if (service.fgetString("NAME") == null || service.fgetString("TARGET") == null) {
      getFrame(false, "Malformed request");
    } else {
      synchronized (SR) {
        ok = SR.delAlias(service.fgetString("NAME"));
      }
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.