net.sf.antcontrib.antserver

Interface Command

All Superinterfaces:
Serializable
Known Implementing Classes:
AbstractCommand, DisconnectCommand, HelloWorldCommand, RunAntCommand, RunTargetCommand, SendFileCommand, ShutdownCommand

public interface Command
extends Serializable

Place class description here.
Authors:
Matthew Inger

Method Summary

boolean
execute(Project project, long contentLength, InputStream contentStream)
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.
InputStream
getReponseContentStream()
long
getResponseContentLength()
boolean
respond(Project project, long contentLength, InputStream contentStream)
Process any additional data from a response.
void
validate(Project project)
This should throw a build exception if the parameters are invalid.

Method Details

execute

public boolean execute(Project project,
                       long contentLength,
                       InputStream contentStream)
            throws Throwable
Execute the 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

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
Returns:
the content's input stream.

getReponseContentStream

public InputStream getReponseContentStream()
            throws IOException

getResponseContentLength

public long getResponseContentLength()

respond

public boolean respond(Project project,
                       long contentLength,
                       InputStream contentStream)
            throws IOException
Process any additional data from a response.

validate

public void validate(Project project)
This should throw a build exception if the parameters are invalid.