Package org.apache.vinci.transport

Examples of org.apache.vinci.transport.ErrorFrame


    VinciFrame out = new VinciFrame();

    String name = in.fgetString("SERVICE");
    if (strip(name) == null)
      return new ErrorFrame("No service name specified");

    String host = strip(in.fgetString("HOST"));
    String realhost = strip(in.fgetString("IP"));
    if (strip(realhost) == null && strip(host) != null) {
      try {
        // Try to resolve the IP if possible
        realhost = (InetAddress.getByName(host)).getHostAddress();
      } catch (Exception e) {
        // realhost = null;

        // return error message
        return new ErrorFrame("Could not resolve IP address for service " + name);
      }
    }

    String instance = in.fgetString("INSTANCE");
    int inst = -1;
View Full Code Here


        e.printStackTrace();
        out.fadd("vinci:ERROR", "Proxy forwarding failed due to " + e);
        return out;
      }
    }
    return new ErrorFrame("Proxy forwarding failed");
  }
View Full Code Here

      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

    Service S = null, srv = null;
    VinciFrame out = new VinciFrame();

    String name = in.fgetString("SERVICE");
    if (strip(name) == null)
      return new ErrorFrame("Invalid service name specified : " + name);
    String host = in.fgetString("HOST");

    if (strip(host) == null) {
      Debug.p("Getting host from socket peer info");
      host = in.fgetString("vinci:REMOTEHOST");
      if (host == null)
        host = in.fgetString("vinci:REMOTEIP");
      if (host == null)
        return new ErrorFrame("Host could not be parsed - specify HOST");
      Debug.p("Peer host is : " + host);
    }

    String level = in.fgetString("LEVEL");
View Full Code Here

    VinciFrame F = null;
    if (ok) {
      F = new VinciFrame();
      F.fadd("STATUS", "OK");
    } else
      return new ErrorFrame(err);

    return F;
  }
View Full Code Here

    VinciFrame out = new VinciFrame();

    String name = in.fgetString("SERVICE");
    if (strip(name) == null)
      return new ErrorFrame("No service name specified");

    String host = strip(in.fgetString("HOST"));
    String realhost = strip(in.fgetString("IP"));
    if (strip(realhost) == null && strip(host) != null) {
      try {
        // Try to resolve the IP if possible
        realhost = (InetAddress.getByName(host)).getHostAddress();
      } catch (Exception e) {
        // realhost = null;

        // return error message
        return new ErrorFrame("Could not resolve IP address for service " + name);
      }
    }

    String instance = in.fgetString("INSTANCE");
    int inst = -1;
View Full Code Here

        e.printStackTrace();
        out.fadd("vinci:ERROR", "Proxy forwarding failed due to " + e);
        return out;
      }
    }
    return new ErrorFrame("Proxy forwarding failed");
  }
View Full Code Here

      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

    Service S = null, srv = null;
    VinciFrame out = new VinciFrame();

    String name = in.fgetString("SERVICE");
    if (strip(name) == null)
      return new ErrorFrame("Invalid service name specified : " + name);
    String host = in.fgetString("HOST");

    if (strip(host) == null) {
      Debug.p("Getting host from socket peer info");
      host = in.fgetString("vinci:REMOTEHOST");
      if (host == null)
        host = in.fgetString("vinci:REMOTEIP");
      if (host == null)
        return new ErrorFrame("Host could not be parsed - specify HOST");
      Debug.p("Peer host is : " + host);
    }

    String level = in.fgetString("LEVEL");
View Full Code Here

    VinciFrame F = null;
    if (ok) {
      F = new VinciFrame();
      F.fadd("STATUS", "OK");
    } else
      return new ErrorFrame(err);

    return F;
  }
View Full Code Here

TOP

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

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.