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

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


            return addToDownloadQueue(protocolHandler.getProtocolFileFor(remoteSite,
                    protocolHandler.getAppropriateProtocolBySite(remoteSite,
                            true), file, false), renamingString, downloadToDir,
                    uniqueMetadataElement, deleteAfterDownload);
        } else
            throw new ProtocolException("Not a valid remote site " + remoteSite);
    }
View Full Code Here


                    else
                        this.wait(5000);
                } catch (Exception e) {
                }
            }
            throw new ProtocolException(
                    "Downloads appear to be hanging . . . aborting wait . . . waited for 15 minutes");
        }
    }
View Full Code Here

            }
            protocol.cdHome();
           
            // Verify again at home directory
            if (home == null || !home.equals(protocol.pwd()))
                throw new ProtocolException(
                        "Home directory not the same after cd");
        } catch (Exception e) {
            LOG.log(Level.SEVERE, "Protocol "
                    + protocol.getClass().getCanonicalName()
                    + " failed compatibility test : " + e.getMessage(), e);
View Full Code Here

 
  public void cd(ProtocolFile file) throws ProtocolException {
      try {
          ftp.changeDir(file.getPath());
      } catch (Exception e) {
          throw new ProtocolException("Failed to cd to " + file + " : "
                  + e.getMessage());
      }
  }
View Full Code Here

  public void connect(String host, Authentication auth) throws ProtocolException {
      try {
          ftp = new FTPClient(host, port);
      } catch (Exception e) {
          throw new ProtocolException("Failed to connect to: " + host + " : "
                  + e.getMessage(), e);
      }
      isConnected = true;

      try {
          ftp.authorize(auth.getUser(), auth.getPass());
          ftp.setActive(ftp.setLocalPassive());
          homeDir = ftp.getCurrentDir();
      } catch (Exception e) {
          throw new ProtocolException("Failed to login to: " + host + " : "
                  + e.getMessage(), e);
      }
  }
View Full Code Here

  public void close() throws ProtocolException {
      try {
          ftp.close();
          isConnected = false;
      } catch (Exception e) {
          throw new ProtocolException("Error disconnecting from "
                  + ftp.getHost() + " : " + e.getMessage());
      }
  }
View Full Code Here

          throws ProtocolException {
      try {
          ftp.setActive(ftp.setLocalPassive());
          ftp.get(fromFile.getPath(), toFile);
      } catch (Exception e) {
          throw new ProtocolException("Failed to download: " + fromFile.getName()
                  + " : " + e.getMessage());
      }
  }
View Full Code Here

 
  public void put(File fromFile, ProtocolFile toFile) throws ProtocolException {
    try {
      ftp.put(fromFile, toFile.getPath(), false);
    }catch (Exception e) {
      throw new ProtocolException("Failed to put file '" + fromFile + "' : " + e.getMessage(), e);
    }
  }
View Full Code Here

     */
  protected void setActive() throws ProtocolException {
      try {
          ftp.setActive(ftp.setLocalPassive());
      } catch (Exception e) {
          throw new ProtocolException("Failed to set ftp active : "
                  + e.getMessage());
      }
  }
View Full Code Here

     */
  protected Vector ftpList(String filter, String modifier) throws ProtocolException {
      try {
          return ftp.list(filter, modifier);
      } catch (Exception e) {
          throw new ProtocolException("Failed to get list of files : "
                  + e.getMessage());
      }

  }
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.