Package org.apache.vinci.transport

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


  }

  // Method to get the hits for a particular service
  public int getHits(String type) {
    VinciFrame out = new VinciFrame();
    out.fadd("vinci:COMMAND", VNS.dirCmdGetHits);
    smartAdd(out, "TYPE", type);
    VinciFrame resp = (VinciFrame) transmit(out);

    checkError(resp);
View Full Code Here


  }

  // Method to get all the hits
  public HitsList getAllHits() {
    VinciFrame out = new VinciFrame();
    out.fadd("vinci:COMMAND", VNS.dirCmdGetHits);
    out.fadd("TYPE", "all");

    VinciFrame resp = (VinciFrame) transmit(out);

    checkError(resp);
View Full Code Here

  // Method to get all the hits
  public HitsList getAllHits() {
    VinciFrame out = new VinciFrame();
    out.fadd("vinci:COMMAND", VNS.dirCmdGetHits);
    out.fadd("TYPE", "all");

    VinciFrame resp = (VinciFrame) transmit(out);

    checkError(resp);
View Full Code Here

  }

  // Generic service interaction method
  public boolean modifyService(Service S, String type) {
    VinciFrame out = new VinciFrame();
    out.fadd("vinci:COMMAND", type);
    out.fadd("SERVICE", S.toFrame());

    VinciFrame resp = (VinciFrame) transmit(out);

    checkError(resp);
View Full Code Here

  // Generic service interaction method
  public boolean modifyService(Service S, String type) {
    VinciFrame out = new VinciFrame();
    out.fadd("vinci:COMMAND", type);
    out.fadd("SERVICE", S.toFrame());

    VinciFrame resp = (VinciFrame) transmit(out);

    checkError(resp);
View Full Code Here

  }

  // Generic alias interaction method
  public boolean modifyAlias(String type, String name, String target) {
    VinciFrame out = new VinciFrame();
    out.fadd("vinci:COMMAND", type);
    VinciFrame srv = new VinciFrame();
    smartAdd(srv, "NAME", name);
    smartAdd(srv, "TARGET", target);
    out.fadd("SERVICE", srv);
View Full Code Here

  private Transportable transmit(Transportable T) {
    try {
      return BaseClient.rpc(T, vnsHost, vnsPort);
    } catch (Exception e) {
      VinciFrame F = new VinciFrame();
      F.fadd("vinci:ERROR", e.toString());
      return F;
    }
  }

  private void checkError(VinciFrame in) {
View Full Code Here

  public static void main(String[] args) {
    System.out.println("Shutting down the service...");
    try {
      String serviceName = args[0];
      VinciFrame query = new VinciFrame();
      query.fadd(Constants.VINCI_COMMAND, Constants.SHUTDOWN);
      VinciClient.rpc(query, serviceName);
    } catch (Exception e) {
      e.printStackTrace();
      System.out.println(e.getMessage());
    }
View Full Code Here

        String fileData = FileUtils.file2String(aFile);

        VinciFrame data = new VinciFrame();
        VinciFrame key = new VinciFrame();

        key.fadd(Constants.VINCI_DETAG, fileData);
        data.fadd("KEYS", key);

        query.fadd(Constants.VINCI_COMMAND, Constants.ANNOTATE);
        query.fadd("DATA", data);
View Full Code Here

                  new Object[] { Thread.currentThread().getName() });
        }
        // String serviceName = input.fgetString("SERVICE");
        int port = getPort();
        input.fdrop("vinci:COMMAND");
        input.fadd("IP", "127.0.0.1");
        input.fadd("PORT", port);

        try {
          if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
            UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
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.