Package message

Examples of message.Message


  public String createContainer(String sid, String cid) throws StorageCloudException {
    try{
      args.clear();
      args.add(sid);
      args.add(cid);
      Message msg = new Message("createContainer", args, null);
      out.writeObject(msg);
      out.reset();
      try {
        msg = (Message) in.readObject();
        if(msg.getOp().equals("ok")){
          //System.out.println("Download executado com sucesso");
          return cid;
        }else{
          //System.out.println("download com problemas");
          throw new StorageCloudException("Container creation failed... maybe container already exist.");
View Full Code Here


      //args.add(sid);
      //args.add(cid);
      for(String str : allNames){
        args.add(str);
      }
      Message msg = new Message("deleteContainer", args, null);
      out.writeObject(msg);
      out.reset();
      try {
        msg = (Message) in.readObject();
        if(msg.getOp().equals("ok")){
          //System.out.println("Delete executado com sucesso");
          return true;
        }else{
          //System.out.println("delete com problemas");
          throw new StorageCloudException("Container creation failed... maybe container already exist.");
View Full Code Here

    try{
      args.clear();
      args.add(sid);
      args.add(containername);
      args.add(dataname);
      Message msg = new Message("getContainerAndDataIDsByName", args, null);
      out.writeObject(msg);
      out.reset();
      try {
        msg = (Message) in.readObject();
        if(msg.getOp().equals("ok") && msg.getArgs() != null){
          //System.out.println("Delete executado com sucesso");
          LinkedList<String> l = msg.getArgs();
          String[] str = new String[l.size()];
          int i = 0;
          for(String a : l){
            str[i] = a;
            i++;
View Full Code Here

TOP

Related Classes of message.Message

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.