Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.enterprisedt.net.ftp
Class AdvancedFTPSettings

    java.lang.Object
      com.enterprisedt.net.ftp.AdvancedFTPSettings

    public class AdvancedFTPSettings

extends java.lang.Object

Holds advanced configuration options not likely to be used for basic FTP operations. These options must be set prior to establishing connections, otherwise they have no effect until a new connection is made.

Version:
  $Revision: 1.5 $
Author:
  Bruce Blackshaw

Method Summary
`java.lang.String` | `getAccountDetails()` Get the account details to be sent at login time for use in the ACCT command
`int` | `getActiveHighPort()` Get the upper limit of the port range for active mode.
`java.lang.String` | `getActiveIPAddress()` The active IP address being used, or null if not used
`int` | `getActiveLowPort()` Get the lower limit of the port range for active mode.
`FTPConnectMode` | `getConnectMode()` Get the data transfer mode.
`DirectoryEmptyStrings` | `getDirectoryEmptyMessages()` Get class that holds fragments of server messages that indicate a directory is empty.
`FileNotFoundStrings` | `getFileNotFoundMessages()` Get class that holds fragments of server messages that indicate a file was not found.
`java.util.Locale[]` | `getParserLocales()` Get the current parser locales used for directory listing parsing
`int` | `getRetryCount()` Get the retry count for retrying file transfers.
`int` | `getRetryDelay()` Get the retry delay between retry attempts, in milliseconds.
`TransferCompleteStrings` | `getTransferCompleteMessages()` Get class that holds fragments of server messages that indicate a transfer completed.
`boolean` | `isAutoPassiveIPSubstitution()` Is automatic substitution of the remote host IP set to be on for passive mode connections?
`boolean` | `isStrictReturnCodes()` Determine if strict checking of return codes is switched on.
`void` | `setAccountDetails(java.lang.String accountDetails)` Set the account details to be sent at login time for use in the ACCT command.
`void` | `setActiveIPAddress(java.lang.String activeIP)` We can force PORT to send a fixed IP address, which can be useful with certain NAT configurations.
`void` | `setActivePortRange(int lowest, int highest)` Force a certain range of ports to be used in active mode.
`void` | `setAutoPassiveIPSubstitution(boolean autoPassiveIPSubstitution)` Set automatic substitution of the remote host IP on if in passive mode
`void` | `setConnectMode(FTPConnectMode mode)` Set the data transfer mode to either active (PORT) or passive (PASV).
`void` | `setParserLocales(java.util.Locale[] locales)` Set the list of locales to be tried for date parsing of directory listings
`void` | `setRetryCount(int retryCount)` Set the retry count for retrying file transfers.
`void` | `setRetryDelay(int retryDelay)` Set the retry delay between retry attempts, in milliseconds
`void` | `setStrictReturnCodes(boolean strict)` Set strict checking of FTP return codes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getConnectMode

    public FTPConnectMode getConnectMode()

  Get the data transfer mode. This only applies to the FTP and FTPS protocols.

  Returns:
    the data transfer mode of the master context

### setConnectMode

    public void setConnectMode(FTPConnectMode mode)
                        throws FTPException

  Set the data transfer mode to either active (PORT) or passive (PASV). Only applicable to FTP/S. Setting applies to all subsequent transfers that are initiated.

  Parameters:
    `mode` - data transfer mode to set
  Throws:
    `FTPException`

### setStrictReturnCodes

    public void setStrictReturnCodes(boolean strict)

  Set strict checking of FTP return codes. If strict checking is on (the default) code must exactly match the expected code. If strict checking is off, only the first digit must match.

  Parameters:
    `strict` - true for strict checking, false for loose checking

### isStrictReturnCodes

    public boolean isStrictReturnCodes()

  Determine if strict checking of return codes is switched on. If it is (the default), all return codes must exactly match the expected code. If strict checking is off, only the first digit must match.

  Returns:
    true if strict return code checking, false if non-strict.

### setParserLocales

    public void setParserLocales(java.util.Locale[] locales)

  Set the list of locales to be tried for date parsing of directory listings

  Parameters:
    `locales` - locales to use

### getParserLocales

    public java.util.Locale[] getParserLocales()

  Get the current parser locales used for directory listing parsing

  Returns:
    Locale[]

### getAccountDetails

    public java.lang.String getAccountDetails()

  Get the account details to be sent at login time for use in the ACCT command

  Returns:
    account details string

### setAccountDetails

    public void setAccountDetails(java.lang.String accountDetails)

  Set the account details to be sent at login time for use in the ACCT command.

  Parameters:
    `accountDetails` - account details to set

### isAutoPassiveIPSubstitution

    public boolean isAutoPassiveIPSubstitution()

  Is automatic substitution of the remote host IP set to be on for passive mode connections?

  Returns:
    true if set on, false otherwise

### setAutoPassiveIPSubstitution

    public void setAutoPassiveIPSubstitution(boolean autoPassiveIPSubstitution)

  Set automatic substitution of the remote host IP on if in passive mode

  Parameters:
    `autoPassiveIPSubstitution` - true if set to on, false otherwise

### setActivePortRange

    public void setActivePortRange(int lowest,
                                   int highest)

  Force a certain range of ports to be used in active mode. This is generally so that a port range can be configured in a firewall. Note that if lowest == highest, a single port will be used. This works well for uploads, but downloads generally require multiple ports, as most servers fail to create a connection repeatedly for the same port.

  Parameters:
    `lowest` - Lower limit of range (should be >= 1024).
    `highest` - Upper limit of range.(should be <= 65535)

### getActiveLowPort

    public int getActiveLowPort()

  Get the lower limit of the port range for active mode.

  Returns:
    lower limit, or -1 if not set

### getActiveHighPort

    public int getActiveHighPort()

  Get the upper limit of the port range for active mode.

  Returns:
    upper limit, or -1 if not set

### setActiveIPAddress

    public void setActiveIPAddress(java.lang.String activeIP)

  We can force PORT to send a fixed IP address, which can be useful with certain NAT configurations.

  Parameters:
    `activeIP` - IP address to force, in 192.168.1.0 form or in IPV6 form, e.g. 1080::8:800:200C:417A

### getActiveIPAddress

    public java.lang.String getActiveIPAddress()

  The active IP address being used, or null if not used

  Returns:
    IP address as a string or null

### getRetryCount

    public int getRetryCount()

  Get the retry count for retrying file transfers. Default is 3 attempts.

  Returns:
    number of times a transfer is retried

### setRetryCount

    public void setRetryCount(int retryCount)

  Set the retry count for retrying file transfers.

  Parameters:
    `retryCount` - new retry count

### getRetryDelay

    public int getRetryDelay()

  Get the retry delay between retry attempts, in milliseconds. Default is 5000.

  Returns:
    retry delay in milliseconds

### setRetryDelay

    public void setRetryDelay(int retryDelay)

  Set the retry delay between retry attempts, in milliseconds

  Parameters:
    `new` - retry delay in milliseconds

### getFileNotFoundMessages

    public FileNotFoundStrings getFileNotFoundMessages()

  Get class that holds fragments of server messages that indicate a file was not found. New messages can be added.

  The fragments are used when it is necessary to examine the message returned by a server to see if it is saying a file was not found. If an FTP server is returning a different message that still clearly indicates a file was not found, use this property to add a new server fragment to the repository via the add method. It would be helpful to email support at enterprisedt dot com to inform us of the message so it can be added to the next build.

  Returns:
    messages class

### getTransferCompleteMessages

    public TransferCompleteStrings getTransferCompleteMessages()

  Get class that holds fragments of server messages that indicate a transfer completed. New messages can be added.

  The fragments are used when it is necessary to examine the message returned by a server to see if it is saying a transfer completed. If an FTP server is returning a different message that still clearly indicates a transfer failed, use this property to add a new server fragment to the repository via the add method. It would be helpful to email support at enterprisedt dot com to inform us of the message so it can be added to the next build.

  Returns:
    messages class

### getDirectoryEmptyMessages

    public DirectoryEmptyStrings getDirectoryEmptyMessages()

  Get class that holds fragments of server messages that indicate a directory is empty. New messages can be added.

  The fragments are used when it is necessary to examine the message returned by a server to see if it is saying a directory is empty. If an FTP server is returning a different message that still clearly indicates a directory is empty, use this property to add a new server fragment to the repository via the add method. It would be helpful to email support at enterprisedt dot com to inform us of the message so it can be added to the next build.

  Returns:
    messages class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2001-2007 Enterprise Distributed Technologies Ltd. All Rights Reserved.