You are here: Home > Specifications > RFTP Classes
     

Home

Documentation

Downloads

Specifications

Credits


RFTP Classes


The following java classes that comprise RFTP are described here.

RFTP Console Interface

RftpConsoleInterface  

File Mover Graphical Interface

FileMover
FrameFM  
ConnectDialog  
LoginDialog  
RunTransfer  
TransferFileD  
TransferThread  
RunTransfer  
NewDirDialog  
ShowHistory  
RftpHelp  

RFTP Client Classes

RftpClient
RftpDataClient  
RftpTransferClient  
RftpCurrentDirectory  

RFTP Server Classes

RftpServer
RftpHandler  
RftpDataServer  
RftpTransferServer  
RftpSecurityManager  


Console Interface

RftpConsoleInterface allows the user to input the raw RftpClient commands directly to RftpClient, which passes them to the server and receive the servers textual responses directly in a console window.   This interface offers several commands that are not available through the File Mover interface, for example, files can be deleted on the server, and the server status requested.

RftpConsoleInterface

·        Accept user input from the console.

·        Instantiate the RftpClient to communicate with the server.

·        Tell RftpClient to perform user commands.

·        Display the response received from RftpClient.

Although the Rftp Server can serve many clients at once, only one FileMover or one RftpConsoleInterface may be run on a single machine at one time.  It is not possible to have one RftpConsoleInterface talking to one machine and a FileMover talking to another machine at the same time.

Top

File Mover

The Rftp graphical user provides the user with a Windows-look environment.  The Rftp GUI instantiates the RftpClient and interacts with it using the raw RftpClient commands.  The Rftp GUI has a status area and the remainder of the window is split into two panes, which display the directory and file information for the local and remote machines.   Menu commands and iconic shortcuts are provided for session initiation, allow browsing the file system of either machine, file transfer capability in both directions, display of transfer status information, transfer abort commands, and directory creation.  A more complete description of the user interaction with File Mover and its classes is provided in the Rftp User's Guide.

FileMover

·        Creates the graphical frame used for the interface.

·        Starts FrameFM within the frame.

FrameFM

·        Contains the graphic elements displayed on the screen for user interaction.

·        Instantiates RftpClient.

·        Processes user commands (actions) on the graphic elements to perform the desired tasks. 

·        Allows browsing the local file structure with the FileChooser java bean.

·        Starts dialogs upon request: ConnectDialog, LoginDialog, NewDirDialog, RunTransfer, RftpHelp, and ShowHistory.

·        Displays contents of the current remote directory.

·         Displays file information for the selected file in the current remote directory.

·         Allows browsing in the remote file structure when the user inputs the name of the desired directory, selects a directory, or presses the go up one level button.

·         Aborts file transfers upon user request.

·        Receives, interprets, and processes responses sent from RftpServer.

·        Identifies RftpServer command responses and appends them to the Session History in ShowHistory.

·        Identifies the data contained in the response and displays it in the proper screen location.

·        Tracks and displays the percentage completed for ongoing file transfers.

ConnectDialog

·        Displays dialog for connection to server.

·        Accepts the IP address of the server for connection.

·        Records the time of connection.

·        Sends the connection request.

LoginDialog

·        Displays dialog for login to server.

·        Accepts the user name and password.

·        Verifies that sufficient setup time has passed between the connection and login.

·        Sends the login request.

NewDirDialog

·        Displays dialog to create a new folder (directory) on the server.

·        Accepts the new folder name.

·        Sends a request for the creation of the new folder.

ShowHistory

·        Displays a frame containing the session history, with all commands that have been performed.

RftpHelp

·        Displays a frame containing the user's guide to FileMover.

RunTransfer

·        This thread exists to allow the asynchronous transfer of files.  By running asynchronously, the transfer can be aborted and the percentage of the file transfer completed can be tracked by FrameFM.

·        Starts the TransferFileD dialog.

TransferFileD

·        Displays a dialog to transfer files.

·        Accepts the local and remote file names for the file transfer.

·        Initiates TransferThread to perform the file transfer.

TransferThread

·        Submits an asynchronous request to FrameFM to perform a file transfer.

Top

Client

Rftp Client classes provide the user with access to the remote machine by establishing and maintaining the tcp/ip connections, sending commands to the Rftp Server, receiving the servers responses, and transferring files.  The commands supported are described in further detail in the Client/Server Interactions section.  They are also described from a user perspective in the Rftp User's Guide.

Rftp Client classes generally behave in conformance with ftp specifications. However, java does not support a change of the current working directory for a running program.  

Therefore, to allow the appearance of changing directories in the remote file structure, the RftpCurrentDirectory class acts as an interpreter.  When the directory is changed for the first time in a CWD or CDUP command, RftpCurrentDirectory keeps track of the desired current directory, and automatically adjusts the command line to refer to the desired directory.  Commands affected by this include CWD, CDUP, RETR, STOR, DELE, RMD, MKD, PWD, and LIST.  If a command is entered with no arguments, and the default is to refer to the working directory, RftpCurrentDirectory alters the command to include an argument of the complete pathname of the current working directory.  If a command is entered with a relative pathname for an argument, RftpCurrentDirectory alters the command to refer to the complete pathname.  

RftpClient

·        Contacts the server to initiate the command socket.

·        Initiates RftpDataClient to provide the data socket.

·        Logs into the server.

·        Sends commands as requested to the server.

·        Receives server reply using the command socket and data link provided by RftpDataClient.  Handles multiple replies by the server over the command socket.

·        Initiates RftpCurrentDirectory upon any change in directory.

·        Monitors the progress of file transfers (complete or in progress).

·        In debug mode, outputs debugging information to the console.

RftpDataClient

·        Opens and closes the stream mode data socket for each data transfer.

·        Sends and receives data in the form of character strings upon request.

·        Sends and receives files upon request.

·        In debug mode, outputs debugging information to the console.

·        Provides the percentage of the file transfer completed.  

RftpTransferClient

·        Asynchronously starts the transfer of a file by requesting that RftpDataServer transfer the file.

RftpCurrentDirectory

·        Keeps track of the default working directory to allow a reset to occur.

·        Keeps track of the current working directory.

·        Adjusts the current working directory as needed to perform a RftpClient change directory command.

·        Adjusts relative pathnames to be relative to the current working directory.

Top

Server

Rftp Server classes serve multiple clients concurrently and serially.  They provide access to the server machine using tcp/ip sockets to provide a data connection and a control connection.  Files are uploaded or downloaded over the data connection using stream transfer mode.  Commands are passed to and from the server using the command connection.   This allows the use of the command connection to monitor the progress of a data transfer and to terminate a data transfer upon the user's request. 

RftpServer

·        Obtains the name of the permissions file used to provide security and verifies that it exists.

·        Creates a logfile named YYYYMMDDHHNN, where YYYY is the year, MM is the month, DD is the day, HH is the hour and NN is the minute of the initiation of the Rftp Server.  The logfile records all client/server transactions.

·        Listens for client connections on the command socket

·        Starts a separate thread, RftpHandler, to serve each new client.  

RftpHandler

·        Receives client commands from one Rftp Client over the command socket.  (See Client Commands and Server Responses section for details on the client commands.)

·        Sends responses to the client over the command socket. (See Client Commands and Server Responses section for details on the server responses.)

·        Obtains user permissions using RftpSecurityManager and verify that user has access permission for each folder or file accessed.

·        Create an RftpDataServer to serve the client over the data socket.

·        Respond to its Rftp Client commands using the command socket and by sending commands to its RftpDataServer to open, close, and send data over the data socket.

·        Records all transactions into the log file.

·        When a file transfer is requested, initiate a thread, RftpTransferServer, to perform file transfers asynchronously.

·        If an abort request is received, sends a message to RftpTransferServer to stop the ongoing file transfer.

·        In debug mode, outputs debugging information to the console.

RftpDataServer

·        Opens and closes the stream mode data socket for each data transfer.

·        Sends and receives data in the form of character strings upon request.

·        Sends and receives files upon request.

·        In debug mode, outputs debugging information to the console.

RftpTransferServer

·        Asynchronously starts the transfer of a file by requesting that RftpDataServer transfer the file.

·        Upon receipt of an abort request from RftpHandler, stops an ongoing file transfer.

RftpSecurityManager

·        Reads the permissions file to obtain user names, passwords, and allowed folders to access.

·        Returns the permissions and allowed access level for a given user name and password.

Rftp security and how to set up the permissions file are described in more detail in the Rftp User's Guide.   

Top


You are here: Home > Specifications > RFTP Classes
   

Home    Documentation     Downloads      Specifications      Credits