net.sf.antcontrib.antserver.commands

Class SendFileCommand

Implemented Interfaces:
Command, Serializable

public class SendFileCommand
extends AbstractCommand
implements Command

Place class description here.
Authors:
Matthew Inger

Method Summary

boolean
execute(Project project, long contentLength, InputStream content)
Execute the command.
long
getContentLength()
Is there additional content being sent from the local machine to the remote server
InputStream
getContentStream()
Gets the content's input stream.
File
getFile()
String
getTodir()
String
getTofile()
void
setFile(File file)
void
setTodir(String todir)
void
setTofile(String tofile)
void
validate(Project project)
This should throw a build exception if the parameters are invalid.

Methods inherited from class net.sf.antcontrib.antserver.commands.AbstractCommand

getContentLength, getContentStream, getReponseContentStream, getResponseContentLength, respond

Method Details

execute

public boolean execute(Project project,
                       long contentLength,
                       InputStream content)
            throws Throwable
Execute the command.
Specified by:
execute in interface Command
Parameters:
project - The project which is being executed
Returns:
If true, the connection will be closed

getContentLength

public long getContentLength()
Is there additional content being sent from the local machine to the remote server
Specified by:
getContentLength in interface Command
Overrides:
getContentLength in interface AbstractCommand

getContentStream

public InputStream getContentStream()
            throws IOException
Gets the content's input stream. Should be called only on the client side for sending the content over the connection
Specified by:
getContentStream in interface Command
Overrides:
getContentStream in interface AbstractCommand
Returns:
the content's input stream.

getFile

public File getFile()

getTodir

public String getTodir()

getTofile

public String getTofile()

setFile

public void setFile(File file)

setTodir

public void setTodir(String todir)

setTofile

public void setTofile(String tofile)

validate

public void validate(Project project)
This should throw a build exception if the parameters are invalid.
Specified by:
validate in interface Command