Package org.apache.oodt.cas.protocol.exceptions

Examples of org.apache.oodt.cas.protocol.exceptions.ProtocolException


  public synchronized void cdRoot() throws ProtocolException {
    try {
      cd(new ProtocolFile("/", true));
    } catch (Exception e) {
      throw new ProtocolException("Failed to cd to root : " + e.getMessage(), e);
    }
  }
View Full Code Here


 
  public synchronized void cdHome() throws ProtocolException {
    try {
      cd(new ProtocolFile("", true));
    } catch (Exception e) {
      throw new ProtocolException("Failed to cd to home : " + e.getMessage(), e);
    }
  }
View Full Code Here

        store.connect(host, port, auth.getUser(), auth.getPass());
        currentFolder = store.getDefaultFolder();
      }
      this.incrementConnections();
    } catch (Exception e) {
      throw new ProtocolException("Failed to connected to IMAPS server " + host
          + " with username " + auth.getUser() + " : " + e.getMessage(), e);
    }
  }
View Full Code Here

//          }
//        }
//        currentFolder.close(true);
        store.close();
      } catch (Exception e) {
        throw new ProtocolException("Failed to close connection : " + e.getMessage(), e);
      } finally {
        store = null;
      }
    }
  }
View Full Code Here

          // message.setFlag(Flags.Flag.DELETED, true);
          break;
        }
      }
    } catch (Exception e) {
      throw new ProtocolException("Failed to download " + fromFile + " to "
          + toFile + " : " + e.getMessage(), e);
    } finally {
      try {
        closeFolder(currentFolder);
      } catch (Exception e) {
View Full Code Here

        }
      }
      // changedDir = false;
    } catch (Exception e) {
      if (!currentFolder.getFullName().equals(""))
        throw new ProtocolException("Failed to ls : " + e.getMessage(), e);
    } finally {
      try {
        closeFolder(currentFolder);
      } catch (Exception e) {
      }
View Full Code Here

          }
        }
      }
    } catch (Exception e) {
      if (!currentFolder.getFullName().equals(""))
        throw new ProtocolException("Failed to ls : " + e.getMessage(), e);
    } finally {
      try {
        closeFolder(currentFolder);
      } catch (Exception e) {
      }
View Full Code Here

      String pwd = currentFolder.getFullName();
      if (!pwd.equals("") && !pwd.startsWith("/"))
        pwd = "/" + pwd;
      return new ProtocolFile(pwd, true);
    } catch (Exception e) {
      throw new ProtocolException("Failed to pwd : " + e.getMessage(), e);
    }
  }
View Full Code Here

        folder.open(Folder.READ_WRITE);
      } catch (Exception e) {
        try {
          folder.open(Folder.READ_ONLY);
        } catch (Exception e2) {
          throw new ProtocolException("Failed to open folder : "
              + e.getMessage() + " : " + e2.getMessage());
        }
      }
    }
    openCalls++;
View Full Code Here

          message.setFlag(Flags.Flag.DELETED, true);
          break;
        }
      }
    } catch (Exception e) {
      throw new ProtocolException("Failed to delete file '" + file + "' : " + e.getMessage(), e);
    } finally {
      closeFolder(currentFolder);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.protocol.exceptions.ProtocolException

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.