|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.core.AbstractActor
adams.flow.standalone.AbstractStandalone
adams.flow.standalone.FTPConnection
public class FTPConnection
Provides access to a FTP host.
If debugging is enabled, the FTP commands issued by other actors will get printed as debug output of this actor.
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: FTPConnection
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-host <java.lang.String> (property: host) The host (name/IP address) to connect to. default:
-user <java.lang.String> (property: user) The FTP user to use for connecting.
-password <adams.core.base.BasePassword> (property: password) The password of the FTP user to use for connecting.
-passive (property: usePassiveMode) If enabled, passive mode is used instead.
-binary (property: useBinaryMode) If enabled, binary mode is used instead of ASCII.
-prompt-for-password (property: promptForPassword) If enabled, the user gets prompted for enter a password if none has been provided in the setup.
-stop-if-canceled (property: stopFlowIfCanceled) If enabled, the flow gets stopped in case the user cancels the dialog.
-custom-stop-message <java.lang.String> (property: customStopMessage) The custom stop message to use in case a user cancelation stops the flow (default is the full name of the actor) default:
| Field Summary | |
|---|---|
protected BasePassword |
m_ActualPassword
the actual SMTP password to use. |
protected org.apache.commons.net.ftp.FTPClient |
m_Client
the FTP client object. |
protected String |
m_CustomStopMessage
the custom stop message to use if flow gets stopped due to cancelation. |
protected String |
m_Host
the FTP host. |
protected BasePassword |
m_Password
the FTP password to use. |
protected boolean |
m_PromptForPassword
whether to prompt the user for a password if none provided. |
protected boolean |
m_StopFlowIfCanceled
whether to stop the flow if canceled. |
protected boolean |
m_UseBinaryMode
whether to use binary file transfer mode. |
protected boolean |
m_UsePassiveMode
whether to use passive mode. |
protected String |
m_User
the FTP user to use. |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_ScopeHandler, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Fields inherited from interface adams.flow.core.Actor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ |
| Constructor Summary | |
|---|---|
FTPConnection()
|
|
| Method Summary | |
|---|---|
String |
customStopMessageTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected void |
disconnect()
Disconnects the FTP session, if necessary. |
protected String |
doExecute()
Executes the flow item. |
boolean |
doInteract()
Performs the interaction with the user. |
String |
getCustomStopMessage()
Returns the custom message to use when stopping the flow. |
org.apache.commons.net.ftp.FTPClient |
getFTPClient()
Returns the FTP client object. |
String |
getHost()
Returns the host to connect to. |
BasePassword |
getPassword()
Returns the FTP password to use. |
boolean |
getPromptForPassword()
Returns whether to prompt for a password if none currently provided. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
boolean |
getStopFlowIfCanceled()
Returns whether to stop the flow if dialog canceled. |
boolean |
getUseBinaryMode()
Returns whether binary mode is used. |
boolean |
getUsePassiveMode()
Returns whether passive mode is used. |
String |
getUser()
Returns the FTP user name to use. |
String |
globalInfo()
Returns a string describing the object. |
String |
hostTipText()
Returns the tip text for this property. |
String |
passwordTipText()
Returns the tip text for this property. |
String |
promptForPasswordTipText()
Returns the tip text for this property. |
void |
protocolCommandSent(org.apache.commons.net.ProtocolCommandEvent event)
This method is invoked by a ProtocolCommandEvent source after sending a protocol command to a server. |
void |
protocolReplyReceived(org.apache.commons.net.ProtocolCommandEvent event)
This method is invoked by a ProtocolCommandEvent source after receiving a reply from a server. |
protected void |
reset()
Resets the actor. |
void |
setCustomStopMessage(String value)
Sets the custom message to use when stopping the flow. |
void |
setHost(String value)
Sets the host to connect to. |
void |
setPassword(BasePassword value)
Sets the FTP password to use. |
void |
setPromptForPassword(boolean value)
Sets whether to prompt for a password if none currently provided. |
void |
setStopFlowIfCanceled(boolean value)
Sets whether to stop the flow if dialog canceled. |
void |
setUseBinaryMode(boolean value)
Sets whether to use binary mode. |
void |
setUsePassiveMode(boolean value)
Sets whether to use passive mode. |
void |
setUser(String value)
Sets the FTP user to use. |
String |
stopFlowIfCanceledTipText()
Returns the tip text for this property. |
String |
useBinaryModeTipText()
Returns the tip text for this property. |
String |
usePassiveModeTipText()
Returns the tip text for this property. |
String |
userTipText()
Returns the tip text for this property. |
void |
wrapUp()
Cleans up after the execution has finished. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface adams.flow.core.Actor |
|---|
cleanUp, compareTo, debug, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setUp, setVariables, sizeOf, stopExecution, stopExecution, variableChanged |
| Methods inherited from interface adams.core.AdditionalInformationHandler |
|---|
getAdditionalInformation |
| Methods inherited from interface adams.core.option.OptionHandler |
|---|
cleanUpOptions, getOptionManager |
| Field Detail |
|---|
protected String m_Host
protected String m_User
protected BasePassword m_Password
protected boolean m_UsePassiveMode
protected boolean m_UseBinaryMode
protected BasePassword m_ActualPassword
protected boolean m_PromptForPassword
protected boolean m_StopFlowIfCanceled
protected String m_CustomStopMessage
protected org.apache.commons.net.ftp.FTPClient m_Client
| Constructor Detail |
|---|
public FTPConnection()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorprotected void reset()
reset in class AbstractActorpublic String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in interface ActorgetQuickInfo in class AbstractActorpublic void setHost(String value)
value - the host name/ippublic String getHost()
public String hostTipText()
public void setUser(String value)
value - the user namepublic String getUser()
public String userTipText()
public void setPassword(BasePassword value)
value - the passwordpublic BasePassword getPassword()
public String passwordTipText()
public void setUsePassiveMode(boolean value)
value - if true passive mode is usedpublic boolean getUsePassiveMode()
public String usePassiveModeTipText()
public void setUseBinaryMode(boolean value)
value - if true binary mode is usedpublic boolean getUseBinaryMode()
public String useBinaryModeTipText()
public void setPromptForPassword(boolean value)
setPromptForPassword in interface OptionalPasswordPromptvalue - true if to prompt for a passwordpublic boolean getPromptForPassword()
getPromptForPassword in interface OptionalPasswordPromptpublic String promptForPasswordTipText()
promptForPasswordTipText in interface OptionalPasswordPromptpublic void setStopFlowIfCanceled(boolean value)
setStopFlowIfCanceled in interface InteractiveActorvalue - if true flow gets stopped if dialog canceledpublic boolean getStopFlowIfCanceled()
getStopFlowIfCanceled in interface InteractiveActorpublic String stopFlowIfCanceledTipText()
stopFlowIfCanceledTipText in interface InteractiveActorpublic void setCustomStopMessage(String value)
setCustomStopMessage in interface InteractiveActorthe - stop messagepublic String getCustomStopMessage()
getCustomStopMessage in interface InteractiveActorpublic String customStopMessageTipText()
customStopMessageTipText in interface InteractiveActorpublic boolean doInteract()
doInteract in interface InteractiveActorpublic org.apache.commons.net.ftp.FTPClient getFTPClient()
protected String doExecute()
doExecute in class AbstractActorprotected void disconnect()
public void wrapUp()
wrapUp in interface ActorwrapUp in class AbstractActorpublic void protocolCommandSent(org.apache.commons.net.ProtocolCommandEvent event)
protocolCommandSent in interface org.apache.commons.net.ProtocolCommandListenerevent - The ProtocolCommandEvent fired.public void protocolReplyReceived(org.apache.commons.net.ProtocolCommandEvent event)
protocolReplyReceived in interface org.apache.commons.net.ProtocolCommandListenerevent - The ProtocolCommandEvent fired.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||