Example usage for org.apache.commons.net DefaultSocketFactory DefaultSocketFactory

List of usage examples for org.apache.commons.net DefaultSocketFactory DefaultSocketFactory

Introduction

In this page you can find the example usage for org.apache.commons.net DefaultSocketFactory DefaultSocketFactory.

Prototype

public DefaultSocketFactory(Proxy proxy) 

Source Link

Document

A constructor for sockets with proxy support.

Usage

From source file:com.atomicleopard.thundr.ftp.commons.SocketClient.java

/**
 * Sets the proxy for use with all the connections.
 * The proxy is used for connections established after the
 * call to this method./*from  ww w . j  ava2 s  .c  o m*/
 *
 * @param proxy the new proxy for connections.
 * @since 3.2
 */
public void setProxy(Proxy proxy) {
    setSocketFactory(new DefaultSocketFactory(proxy));
    connProxy = proxy;
}