Package org.jboss.soa.esb.util

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


        public File downloadFile(File file) throws CourierException
        {
                try
                {
                        String name = file.getName();
                        final RemoteFileSystem handler = getHandler() ;
                        try
                        {
                            handler.downloadFile(name, name);
                        }
                        finally
                        {
                            handler.quit() ;
                        }
                        return new File(_localDir,name);
                }
                catch (Exception e)
                {
View Full Code Here


        public File[] getFileList() throws CourierException
        {
                String[] names = null;

                final RemoteFileSystem handler = getHandler() ;
                try
                {
                        names = handler.getFileListFromRemoteDir(_epr.getInputSuffix());
                }
                catch (Exception e)
                {
                        e.printStackTrace();
                       
                        throw new CourierException(e);
                }
                finally
                {
                    handler.quit() ;
                }

                if (null == names)
                        return null;
                File[] files = new File[names.length];
View Full Code Here

                return files;
        }

        public boolean renameFile(File from, File to) throws CourierException
        {
                final RemoteFileSystem handler = getHandler() ;
                try
                {
                        handler.remoteRename(from, to);

                        return true;
                }
                catch (IOException ex// file not found
                {
                        return false;
                }
                catch (Exception e)
                {
                        throw new CourierException(e);
                }
                finally
                {
                    handler.quit();
                }
        }
View Full Code Here

        // TODO there's room for optimization here - not for GA though
        protected RemoteFileSystem getHandler() throws CourierException
        {
                try
                {
                        RemoteFileSystem rfs = RemoteFileSystemFactory.getRemoteFileSystem(
                                        _epr, true);
                        try
                        {
                                rfs.setRemoteDir(_remoteDir);
                        }
                        catch (Exception e)
                        {
                                throw new CourierException(e);
                        }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.util.RemoteFileSystem

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.