AdventNet Web NMS 4 API Specification

com.adventnet.management.config.ftp
Class FTPDevice

java.lang.Object
  |
  +--com.adventnet.management.config.xml.BaseElement
        |
        +--com.adventnet.management.config.xml.Device
              |
              +--com.adventnet.management.config.ftp.FTPDevice
All Implemented Interfaces:
java.io.Serializable

public class FTPDevice
extends Device

This class holds the FTP specific properties like user name and password. Here user name and password are used for creating a authenticated ftp session to the ftp device for file transfer.

See Also:
Serialized Form

Fields inherited from class com.adventnet.management.config.xml.BaseElement
element, isServer
 
Constructor Summary
FTPDevice()
          Constructs a FTPDevice with localhost as deviceName and 21 as ftp port.
FTPDevice(Device device)
          Constructs a FTPDevice from the specified Device's Element.
FTPDevice(java.lang.String deviceName, int port, java.lang.String userName)
          Constructs a FTPDevice with the specified device name, port and user name.
FTPDevice(java.lang.String deviceName, int port, java.lang.String userName, java.lang.String password)
          Constructs a FTPDevice with the specified deviceName, port, userName and password.
FTPDevice(java.lang.String deviceName, java.lang.String userName)
          Constructs a FTPDevice with the specified device name and user name.
FTPDevice(java.lang.String deviceName, java.lang.String userName, java.lang.String password)
          Constructs a FTPDevice with the specified device name, user name and password.
 
Method Summary
 java.lang.String getAttribute(java.lang.String name)
          Method used to get the value of an attribute.
 java.lang.String getPassword()
          Returns the password of the user account.
 java.lang.String getUserName()
          Returns the name of the user account.
 void setPassword(java.lang.String password)
          Sets the password for the user account.
 void setUserName(java.lang.String userName)
          Sets the name of the user account used in the ftp device.
 
Methods inherited from class com.adventnet.management.config.xml.Device
getDeviceName, getMOName, getPort, getRetries, getTimeout, setMOName, setRetries, setTimeout
 
Methods inherited from class com.adventnet.management.config.xml.BaseElement
addSubTag, getElement, getProperties, getSubTagsByName, hasAttribute, removeSubTagsByName, setAttribute, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FTPDevice

public FTPDevice()
Constructs a FTPDevice with localhost as deviceName and 21 as ftp port.

FTPDevice

public FTPDevice(Device device)
Constructs a FTPDevice from the specified Device's Element.
Parameters:
device - Device object whose element is taken for initialization.

FTPDevice

public FTPDevice(java.lang.String deviceName,
                 java.lang.String userName)
Constructs a FTPDevice with the specified device name and user name. Here empty string is assigned for password.
Parameters:
deviceName - name of the ftp device.
userName - name of the user account specified in the ftp device.

FTPDevice

public FTPDevice(java.lang.String deviceName,
                 int port,
                 java.lang.String userName)
Constructs a FTPDevice with the specified device name, port and user name. Here empty string is assigned for password.
Parameters:
deviceName - name of the ftp device.
port - port number on which ftp device is listening.
userName - name of the user account specified in the ftp device.

FTPDevice

public FTPDevice(java.lang.String deviceName,
                 java.lang.String userName,
                 java.lang.String password)
Constructs a FTPDevice with the specified device name, user name and password.
Parameters:
deviceName - name of the ftp device.
userName - name of the user account specified in the ftp device.
password - password for the user account.

FTPDevice

public FTPDevice(java.lang.String deviceName,
                 int port,
                 java.lang.String userName,
                 java.lang.String password)
Constructs a FTPDevice with the specified deviceName, port, userName and password.
Parameters:
deviceName - name of the ftp device.
port - port number on which ftp device is listening.
userName - name of the user account specified in the ftp device.
password - password for the user account.
Method Detail

setUserName

public void setUserName(java.lang.String userName)
Sets the name of the user account used in the ftp device.
Parameters:
userName - name of the user account specified in the ftp device.

getUserName

public java.lang.String getUserName()
Returns the name of the user account.

setPassword

public void setPassword(java.lang.String password)
Sets the password for the user account.
Parameters:
password - password for the user account.

getPassword

public java.lang.String getPassword()
Returns the password of the user account.
Returns:
the password of the user account.

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Description copied from class: BaseElement
Method used to get the value of an attribute.
Overrides:
getAttribute in class BaseElement
Following copied from class: com.adventnet.management.config.xml.BaseElement
Parameters:
name - name of the property whose value is requested.
Returns:
the attribute's value.

AdventNet Web NMS 4 API Specification