Example usage for org.springframework.integration.file.remote.session Session Session

List of usage examples for org.springframework.integration.file.remote.session Session Session

Introduction

In this page you can find the example usage for org.springframework.integration.file.remote.session Session Session.

Prototype

Session

Source Link

Usage

From source file:demo.TestSessionFactory.java

@Override
public Session<FTPFile> getSession() {
    Session<FTPFile> session = new Session<FTPFile>() {

        public boolean remove(String path) throws IOException {
            return true;
        }/* w  ww  . j  a  v  a  2s . co  m*/

        public FTPFile[] list(String path) throws IOException {
            return new FTPFile[] {};
        }

        public void read(String source, OutputStream outputStream) throws IOException {
        }

        public void write(InputStream inputStream, String destination) throws IOException {
        }

        public boolean mkdir(String directory) throws IOException {
            return true;
        }

        public void rename(String pathFrom, String pathTo) throws IOException {
        }

        public void close() {
        }

        public boolean isOpen() {
            return true;
        }

        public boolean exists(String path) throws IOException {
            return true;
        }

        public String[] listNames(String path) throws IOException {
            return new String[] {};
        }
    };
    return session;
}