goldengate.ftp.core.command
Class AbstractCommand

java.lang.Object
  extended by goldengate.ftp.core.command.AbstractCommand
All Implemented Interfaces:
goldengate.common.command.CommandInterface
Direct Known Subclasses:
ABOR, ACCT, ALLO, APPE, CDUP, ConnectionCommand, CWD, DELE, EPRT, EPSV, FEAT, HELP, IncorrectCommand, INTERNALSHUTDOWN, LIMITBANDWIDTH, LIST, MDTM, MKD, MLSD, MLST, MODE, NLST, NOOP, OPTS, PASS, PASV, PORT, PWD, QUIT, REST, RETR, RMD, RNFR, RNTO, SITE, SIZE, STAT, STOR, STOU, STRU, SYST, TYPE, UnimplementedCommand, UnknownCommand, USER, XCRC, XMD5, XSHA1

public abstract class AbstractCommand
extends Object
implements goldengate.common.command.CommandInterface

Abstract definition of an FTP Command

Author:
Frederic Bregier

Constructor Summary
AbstractCommand()
           
 
Method Summary
 String getArg()
           
 String[] getArgs()
           
 FtpCommandCode getCode()
           
 String getCommand()
           
 FtpConfiguration getConfiguration()
           
 Object getObject()
           
 FtpSession getSession()
           
 int getValue(String argx)
           
 boolean hasArg()
           
 void invalidCurrentCommand()
           
 boolean isNextCommandValid(goldengate.common.command.CommandInterface newCommandArg)
           
 void setArgs(goldengate.common.file.SessionInterface session, String command, String arg, Enum code)
           
 void setExtraNextCommand(Enum extraNextCommand)
           
 void setObject(Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface goldengate.common.command.CommandInterface
exec
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

setArgs

public void setArgs(goldengate.common.file.SessionInterface session,
                    String command,
                    String arg,
                    Enum code)
Specified by:
setArgs in interface goldengate.common.command.CommandInterface

setExtraNextCommand

public void setExtraNextCommand(Enum extraNextCommand)
Specified by:
setExtraNextCommand in interface goldengate.common.command.CommandInterface

isNextCommandValid

public boolean isNextCommandValid(goldengate.common.command.CommandInterface newCommandArg)
Specified by:
isNextCommandValid in interface goldengate.common.command.CommandInterface

getObject

public Object getObject()
Specified by:
getObject in interface goldengate.common.command.CommandInterface

setObject

public void setObject(Object object)
Specified by:
setObject in interface goldengate.common.command.CommandInterface

getArg

public String getArg()
Specified by:
getArg in interface goldengate.common.command.CommandInterface

getArgs

public String[] getArgs()
Specified by:
getArgs in interface goldengate.common.command.CommandInterface

getValue

public int getValue(String argx)
             throws goldengate.common.exception.InvalidArgumentException
Specified by:
getValue in interface goldengate.common.command.CommandInterface
Throws:
goldengate.common.exception.InvalidArgumentException

getCommand

public String getCommand()
Specified by:
getCommand in interface goldengate.common.command.CommandInterface

hasArg

public boolean hasArg()
Specified by:
hasArg in interface goldengate.common.command.CommandInterface

getSession

public FtpSession getSession()
Specified by:
getSession in interface goldengate.common.command.CommandInterface
Returns:
the current FtpSession

getConfiguration

public FtpConfiguration getConfiguration()
Returns:
The current configuration object

invalidCurrentCommand

public void invalidCurrentCommand()
Specified by:
invalidCurrentCommand in interface goldengate.common.command.CommandInterface

getCode

public FtpCommandCode getCode()
Specified by:
getCode in interface goldengate.common.command.CommandInterface
Returns:
The FtpCommandCode associated with this command


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.