edu.colorado.cs.ns2.agents
Class FTPAgent

java.lang.Object
  extended by edu.colorado.cs.ns2.agents.Application
      extended by edu.colorado.cs.ns2.agents.FTPAgent
All Implemented Interfaces:
java.io.Serializable

public class FTPAgent
extends Application

This is the NS2 implementation of the File Transfer Protocol (FTP).

Author:
Kevin Bauer, Pushkar Sambhoos.
See Also:
Serialized Form

Nested Class Summary
 class FTPAgent.FTPPropertiesDialog
          This nested class is responsible for creating and displaying a dialog box to allow the user to interactively set the FTPAgent's properties.
 
Field Summary
private static long serialVersionUID
          Generated serial version UID.
 
Fields inherited from class edu.colorado.cs.ns2.agents.Application
acceptableConnectAgents, agentId, applicationId, applicationName, nodeId, startEventScheduled, stopEventScheduled, variableName
 
Constructor Summary
FTPAgent(int nextId, int nodeId, int agentId)
          Default Constructor
 
Method Summary
 java.lang.String addApplicationToScript(NsNode node, int agentElement)
          Returns the String to be Written for the FTPAgent Application.
 java.util.Vector<java.lang.String> getAcceptableAgents()
          Returns a Vector of acceptable agents on which this Application may be attached.
protected  void setAcceptableConnectAgents()
          Populates a list of acceptable Agents on which this Application may be attached.
 void setProperties()
          Allows the user to interactively set the FTPAgent's properties via a dialog box.
 java.lang.String toString()
          Returns a String representation of the FTPAgent type.
 
Methods inherited from class edu.colorado.cs.ns2.agents.Application
getAgentId, getApplicatinName, getApplicationId, getApplicationName, getNodeId, getVariableName, isStartEventScheduled, isStopEventScheduled, setAgentId, setApplicatioName, setApplicationId, setApplicationName, setNodeId, setStartEventScheduled, setStopEventScheduled, setVariableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Generated serial version UID.

See Also:
Constant Field Values
Constructor Detail

FTPAgent

public FTPAgent(int nextId,
                int nodeId,
                int agentId)
Default Constructor

Parameters:
nextId - Agent/ Application id - Globally Incremented.
nodeId - Associates with this Node.
Method Detail

addApplicationToScript

public java.lang.String addApplicationToScript(NsNode node,
                                               int agentElement)
Returns the String to be Written for the FTPAgent Application.

Specified by:
addApplicationToScript in class Application
Parameters:
node - The Node on which to attach.
agentElement - Index of Agent to which this Application is to be attached.
Returns:
String to be appended to the TCL script.

getAcceptableAgents

public java.util.Vector<java.lang.String> getAcceptableAgents()
Returns a Vector of acceptable agents on which this Application may be attached.

Overrides:
getAcceptableAgents in class Application
Returns:
A Vector of acceptable agents on which this Application may be attached.

toString

public java.lang.String toString()
Returns a String representation of the FTPAgent type.

Overrides:
toString in class java.lang.Object
Returns:
A String representation of the FTPAgent type.

setProperties

public void setProperties()
Allows the user to interactively set the FTPAgent's properties via a dialog box.

Specified by:
setProperties in class Application

setAcceptableConnectAgents

protected void setAcceptableConnectAgents()
Populates a list of acceptable Agents on which this Application may be attached.

Specified by:
setAcceptableConnectAgents in class Application