Example usage for org.apache.commons.net.ftp FTPClient abort

List of usage examples for org.apache.commons.net.ftp FTPClient abort

Introduction

In this page you can find the example usage for org.apache.commons.net.ftp FTPClient abort.

Prototype

public boolean abort() throws IOException 

Source Link

Document

Abort a transfer in progress.

Usage

From source file:org.apache.jmeter.protocol.ftp.sampler.FTPSampler.java

/** {@inheritDoc} */
@Override//from   www .  j  a va 2 s.  c  o m
public boolean interrupt() {
    FTPClient client = savedClient;
    if (client != null) {
        savedClient = null;
        try {
            client.abort();
        } catch (IOException ignored) {
        }
        try {
            client.disconnect();
        } catch (IOException ignored) {
        }
    }
    return client != null;
}