Examples of RemoteFileSystemException


Examples of org.eclipse.ecf.filetransfer.RemoteFileSystemException

  public LocalFileSystemBrowser(IFileID directoryID2, IRemoteFileSystemListener listener) throws RemoteFileSystemException {
    super(directoryID2, listener, null, null, null);
    try {
      local = new File(directoryID2.getURL().getPath());
    } catch (MalformedURLException e) {
      throw new RemoteFileSystemException(e);
    }
    if (!local.exists())
      throw new RemoteFileSystemException(NLS.bind(Messages.FileSystemBrowser_EXCEPTION_DIRECTORY_DOES_NOT_EXIST, local));
  }
View Full Code Here

Examples of org.eclipse.ecf.filetransfer.RemoteFileSystemException

    Assert.isNotNull(listener);
    URL url;
    try {
      url = directoryOrFileID.getURL();
    } catch (final MalformedURLException e) {
      throw new RemoteFileSystemException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
    }

    IRemoteFileSystemBrowserContainerAdapter fileSystemBrowser = null;
    fileSystemBrowser = Activator.getDefault().getBrowseFileTransfer(url.getProtocol());
View Full Code Here

Examples of org.eclipse.ecf.filetransfer.RemoteFileSystemException

        Assert.isNotNull(listener);
        URL url;
        try {
          url = directoryOrFileId.getURL();
        } catch (final MalformedURLException e) {
          throw new RemoteFileSystemException(NLS.bind("Exception creating URL for {0}", directoryOrFileId)); //$NON-NLS-1$
        }

        HttpClientFileSystemBrowser browser = new HttpClientFileSystemBrowser(new DefaultHttpClient(), directoryOrFileId, listener, url, connectContext, proxy);
        return browser.sendBrowseRequest();
      }
View Full Code Here

Examples of org.eclipse.ecf.filetransfer.RemoteFileSystemException

    try {
      efsDirectory = directoryOrFileID.getURL();
      final String path = StringUtils.replaceAll(efsDirectory.getPath(), " ", "%20"); //$NON-NLS-1$ //$NON-NLS-2$
      fsb = new FileStoreBrowser(EFS.getStore(new URI(path)), efsDirectory, directoryOrFileID, listener);
    } catch (final Exception e) {
      throw new RemoteFileSystemException(e);
    }
    return fsb.sendBrowseRequest();
  }
View Full Code Here

Examples of org.eclipse.ecf.filetransfer.RemoteFileSystemException

        Assert.isNotNull(listener);
        URL url;
        try {
          url = directoryOrFileId.getURL();
        } catch (final MalformedURLException e) {
          throw new RemoteFileSystemException(NLS.bind("Exception creating URL for {0}", directoryOrFileId)); //$NON-NLS-1$
        }

        HttpClientFileSystemBrowser browser = new HttpClientFileSystemBrowser(new HttpClient(), directoryOrFileId, listener, url, connectContext, proxy);
        return browser.sendBrowseRequest();
      }
View Full Code Here

Examples of org.jboss.soa.esb.util.RemoteFileSystemException

                        m_oParms.setAttribute(PARMS_TIMEOUT_DATA, Integer.toString(m_iTimeoutData));
                        m_oParms.setAttribute(PARMS_TIMEOUT_SO, Integer.toString(m_iTimeoutSo));
                }
                catch (Exception e)
                {
                        throw new RemoteFileSystemException(e);
                }
        }
View Full Code Here

Examples of org.jboss.soa.esb.util.RemoteFileSystemException

            try
            {
                changeRemoteDirectory() ;
                if (!m_oConn.deleteFile(p_sFile))
                {
                    throw new RemoteFileSystemException("Failed to delete remote file: " + m_oConn.getReplyString());
                }
            }
            catch (final IOException ioe)
            {
                throw new RemoteFileSystemException(ioe);
            }
        }
View Full Code Here

Examples of org.jboss.soa.esb.util.RemoteFileSystemException

                       
                    changeRemoteDirectory() ;
                    final InputStream is = m_oConn.retrieveFileStream(p_sFile) ;
                    if (is == null)
                    {
                        throw new RemoteFileSystemException("Could not download file: " + m_oConn.getReplyString());
                    }
                   
                    try
                    {
                        final FileOutputStream fos = new FileOutputStream(oNewTmp) ;
                        try
                        {
                            copyStream(is, fos) ;
                        }
                        finally
                        {
                            fos.close() ;
                        }
                    }
                    finally
                    {
                        is.close() ;
                    }
                    if (!m_oConn.completePendingCommand())
                    {
                        boolean result = oNewTmp.delete();
                        if (!result) {
                          logger.error("Could not delete file " + oNewTmp.getAbsolutePath());
                        }
                        throw new RemoteFileSystemException("Failed to download contents: " + m_oConn.getReplyString()) ;
                    }
                    FileUtil.renameTo(oNewTmp, oNew) ;
                }
                catch (final IOException ioe)
                {
                    throw new RemoteFileSystemException(ioe) ;
                }
        }
View Full Code Here

Examples of org.jboss.soa.esb.util.RemoteFileSystemException

                        changeRemoteDirectory() ;
                        return m_oConn.listNames() ;
                    }
                    catch (final IOException ioe)
                    {
                        throw new RemoteFileSystemException(ioe) ;
                    }             
            } else {
              String sSuffix = "*" + p_sSuffix;

              try
              {
                changeRemoteDirectory() ;
                return m_oConn.listNames(sSuffix) ;
              }
              catch (final IOException ioe)
              {
                throw new RemoteFileSystemException(ioe) ;
              }
            }
        }
View Full Code Here

Examples of org.jboss.soa.esb.util.RemoteFileSystemException

                    }
                   
                    connect() ;
                   
                    if (!m_oConn.isConnected())
                        throw new RemoteFileSystemException(
                                        "Can't connect to FTP server");
                   
                    if (!m_oConn.login(m_sUser, m_sPasswd))
                    {
                        m_oConn.logout() ;
                        throw new RemoteFileSystemException("Remote login failed: " + m_oConn.getReplyString());
                    }
                    m_oConn.setFileType(FTP.BINARY_FILE_TYPE) ;
                    if (m_bPassive)
                    {
                        m_oConn.enterLocalPassiveMode() ;
                    }
                    if (m_iTimeoutData > 0)
                    {
                        m_oConn.setDataTimeout(m_iTimeoutData);
                    }
                    if (m_iTimeoutSo > 0)
                    {
                        m_oConn.setSoTimeout(m_iTimeoutSo);
                    }
                }
                catch (final IOException ioe)
                {
                    if (m_oConn.isConnected())
                    {
                        try
                        {
                            m_oConn.disconnect() ;
                        }
                        catch (final IOException ioe2) {} // ignore
                    }
                    throw new RemoteFileSystemException(ioe);
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.