Package org.apache.oodt.cas.pushpull.exceptions

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


     */
    public void sendNoOP() throws ProtocolException {
        try {
            ftp.noop();
        } catch (Exception e) {
            throw new ProtocolException("Failed to send NoOP command");
        }
    }
View Full Code Here


    @Override
    public void disconnectFromServer() throws ProtocolException {
        try {
            ftp.disconnect();
        } catch (IOException e) {
            throw new ProtocolException("Failed to disconnect from "
                    + this.getRemoteSite().getURL());
        }
    }
View Full Code Here

        this.connect(remoteSite.getURL().getHost(), remoteSite.getUsername(),
                remoteSite.getPassword());
        try {
            homeDir = this.getCurrentWorkingDir();
        } catch (Exception e) {
            throw new ProtocolException(
                    "Failed to pwd after connect to store cwd : "
                            + e.getMessage());
        }
        this.cwd = this.homeDir;
    }
View Full Code Here

        this.cwd = this.homeDir;
    }

    protected synchronized void reconnect() throws ProtocolException {
        if (this.remoteSite == null)
            throw new ProtocolException(
                    "Can't reconnect a Protocol which has never been initially connected");

        try {
            this.disconnect();
        } catch (Exception e) {
View Full Code Here

            LOG.log(Level.INFO, "Changing to ROOT directory '/'");
            this.cdToRoot();
            this.cwd = new ProtocolFile(this.getRemoteSite(), new ProtocolPath(
                    "/", true));
        } catch (Exception e) {
            throw new ProtocolException("Failed to cd to Root directory : "
                    + e.getMessage());
        }
    }
View Full Code Here

                file = this.homeDir.getProtocolPath().getPathString() + "/"
                        + file;
            return new ProtocolFile(this.getRemoteSite(), new ProtocolPath(
                    file, isDir));
        } catch (Exception e) {
            throw new ProtocolException("Failed to create protocol for " + file
                    + " : " + e.getMessage());
        }
    }
View Full Code Here

  protected void chDir(ProtocolPath path) throws ProtocolException {
    try {
      sftpChannel.cd(path.getPathString());
    } catch (Exception e) {
      throw new ProtocolException("Failed to cd to " + path + " : "
          + e.getMessage());
    }
  }
View Full Code Here

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

                if (filter == null || filter.accept(file))
                    returnList.add(file);
            }
            return returnList;
        } catch (Exception e) {
            throw new ProtocolException(
                    "Failed to get file list using filter : " + e.getMessage());
        }
    }
View Full Code Here

      session.setPassword(password);
      session.connect();
      sftpChannel = (ChannelSftp) session.openChannel("sftp");
      sftpChannel.connect();
    } catch (Exception e) {
      throw new ProtocolException("Failed to connect to host " + host + " : "
          + e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.pushpull.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.