JSCAPE MFT Server

com.jscape.inet.mft.resources
Class FtpResourceDescriptor

java.lang.Object
  extended by com.jscape.inet.mft.resources.FtpResourceDescriptor
All Implemented Interfaces:
com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>, ResourceDescriptor

public class FtpResourceDescriptor
extends java.lang.Object
implements com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>

FTP resource descriptor. Contains information about remote FTP connection.

Author:
Alex

Nested Class Summary
static interface FtpResourceDescriptor.Handler
           
 
Nested classes/interfaces inherited from interface com.jscape.inet.mft.resources.RemoteResourceDescriptor
com.jscape.inet.mft.resources.RemoteResourceDescriptor.HandlerBase
 
Field Summary
static java.lang.String[] ALL_TYPES
           
static java.util.Map<java.lang.String,java.lang.Integer> DEFAULT_PORTS
           
static java.lang.String EXPLICIT_SSL
           
static java.lang.String IMPLICIT_SSL
           
static java.util.Map<java.lang.String,java.lang.Boolean> KEY_USAGE
           
static java.lang.String REGULAR
           
 
Constructor Summary
FtpResourceDescriptor()
          Creates a new descriptor instance.
FtpResourceDescriptor(FtpResourceDescriptor that)
           
FtpResourceDescriptor(java.lang.String name, java.lang.String host, int port, java.lang.String connectionType, java.lang.String username, java.lang.String password, boolean passive, boolean usingCredentials, long timeout, com.jscape.inet.vfs.KeyProvider keyProvider, java.lang.String logDirectory, java.lang.Long timeToLive, com.jscape.inet.mft.RemoteDirectory remoteDirectory)
           
 
Method Summary
 void accept(FtpResourceDescriptor.Handler handler)
           
 FtpResourceDescriptor copy()
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getConnectionType()
          Returns connection type name.
 java.lang.String getHost()
          Returns server hostname/IP.
 com.jscape.inet.vfs.KeyProvider getKeyProvider()
           
 java.lang.String getLogDirectory()
           
 java.lang.String getName()
          Returns resource name.
 boolean getPassive()
          Returns FTP passie connection flag.
 java.lang.String getPassword()
          Returns connection password.
 int getPort()
          Returns server port.
 com.jscape.inet.mft.RemoteDirectory getRemoteDirectory()
           
 long getTimeout()
           
 java.lang.Long getTimeToLive()
           
 java.lang.String getUsername()
          Returns username.
 boolean getUsingCredentials()
          Returns use user credentials indicator.
 int hashCode()
           
 void setConnectionType(java.lang.String value)
          Sets connection type name.
 void setHost(java.lang.String value)
          Sets server hostname/IP.
 void setKey(java.lang.String value)
           
 void setKeyProvider(com.jscape.inet.vfs.KeyProvider value)
           
 void setLogDirectory(java.lang.String value)
           
 void setName(java.lang.String value)
          Sets resource name.
 void setPassive(boolean value)
          Sets FTP passive connection flag.
 void setPassword(java.lang.String value)
          Sets connection password.
 void setPort(int value)
          Sets server port.
 void setRemoteDirectory(com.jscape.inet.mft.RemoteDirectory value)
           
 void setTimeout(long value)
           
 void setTimeToLive(java.lang.Long value)
           
 void setUsername(java.lang.String value)
          Sets username.
 void setUsingCredentials(boolean value)
          Sets use user credentials.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REGULAR

public static final java.lang.String REGULAR
See Also:
Constant Field Values

EXPLICIT_SSL

public static final java.lang.String EXPLICIT_SSL
See Also:
Constant Field Values

IMPLICIT_SSL

public static final java.lang.String IMPLICIT_SSL
See Also:
Constant Field Values

ALL_TYPES

public static final java.lang.String[] ALL_TYPES

DEFAULT_PORTS

public static final java.util.Map<java.lang.String,java.lang.Integer> DEFAULT_PORTS

KEY_USAGE

public static final java.util.Map<java.lang.String,java.lang.Boolean> KEY_USAGE
Constructor Detail

FtpResourceDescriptor

public FtpResourceDescriptor(java.lang.String name,
                             java.lang.String host,
                             int port,
                             java.lang.String connectionType,
                             java.lang.String username,
                             java.lang.String password,
                             boolean passive,
                             boolean usingCredentials,
                             long timeout,
                             com.jscape.inet.vfs.KeyProvider keyProvider,
                             java.lang.String logDirectory,
                             java.lang.Long timeToLive,
                             com.jscape.inet.mft.RemoteDirectory remoteDirectory)

FtpResourceDescriptor

public FtpResourceDescriptor(FtpResourceDescriptor that)

FtpResourceDescriptor

public FtpResourceDescriptor()
Creates a new descriptor instance.

Method Detail

getName

public java.lang.String getName()
Returns resource name.

Specified by:
getName in interface ResourceDescriptor
Returns:
resource name

setName

public void setName(java.lang.String value)
Sets resource name.

Parameters:
value - the resource name

getHost

public java.lang.String getHost()
Returns server hostname/IP.

Returns:
server hostname/IP

setHost

public void setHost(java.lang.String value)
Sets server hostname/IP.

Parameters:
value - the server hostname/IP

getPort

public int getPort()
Returns server port.

Returns:
server port

setPort

public void setPort(int value)
Sets server port.

Parameters:
value - the server port

getConnectionType

public java.lang.String getConnectionType()
Returns connection type name.

Returns:
connection type name

setConnectionType

public void setConnectionType(java.lang.String value)
Sets connection type name. Allowed connection types are: "regular", "explicit SSL" and "implicit SSL".

Parameters:
value - the connection type name

getUsingCredentials

public boolean getUsingCredentials()
Returns use user credentials indicator.

Specified by:
getUsingCredentials in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>
Returns:
true user will authenticate to FTP resource using current user credentials, false otherwise

setUsingCredentials

public void setUsingCredentials(boolean value)
Sets use user credentials. When it is true user will authenticate to FTP resource with the current user credentials

Parameters:
value - Indicates use current user credentials

getUsername

public java.lang.String getUsername()
Returns username.

Specified by:
getUsername in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>
Returns:
username

setUsername

public void setUsername(java.lang.String value)
Sets username.

Specified by:
setUsername in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>
Parameters:
value - the username

getPassword

public java.lang.String getPassword()
Returns connection password.

Specified by:
getPassword in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>
Returns:
connection password

setPassword

public void setPassword(java.lang.String value)
Sets connection password.

Specified by:
setPassword in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>
Parameters:
value - the connection password

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long value)

getPassive

public boolean getPassive()
Returns FTP passie connection flag.

Returns:
true if data connection should be opened in FTP passive mode; false otherwise

setPassive

public void setPassive(boolean value)
Sets FTP passive connection flag.

Parameters:
value - if true data connection will be opened in FTP passive mode

setKey

public void setKey(java.lang.String value)

getKeyProvider

public com.jscape.inet.vfs.KeyProvider getKeyProvider()

setKeyProvider

public void setKeyProvider(com.jscape.inet.vfs.KeyProvider value)

getLogDirectory

public java.lang.String getLogDirectory()

setLogDirectory

public void setLogDirectory(java.lang.String value)

getTimeToLive

public java.lang.Long getTimeToLive()
Specified by:
getTimeToLive in interface ResourceDescriptor

setTimeToLive

public void setTimeToLive(java.lang.Long value)

getRemoteDirectory

public com.jscape.inet.mft.RemoteDirectory getRemoteDirectory()
Specified by:
getRemoteDirectory in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>

setRemoteDirectory

public void setRemoteDirectory(com.jscape.inet.mft.RemoteDirectory value)
Specified by:
setRemoteDirectory in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>

copy

public FtpResourceDescriptor copy()
Specified by:
copy in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>

accept

public void accept(FtpResourceDescriptor.Handler handler)
            throws java.lang.Exception
Specified by:
accept in interface com.jscape.inet.mft.resources.RemoteResourceDescriptor<FtpResourceDescriptor.Handler>
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

JSCAPE MFT Server

Copyright © JSCAPE LLC. 1999-2013. All Rights Reserved