net.sf.antcontrib.antserver.commands

Class AbstractCommand

Implemented Interfaces:
Command, Serializable
Known Direct Subclasses:
DisconnectCommand, HelloWorldCommand, RunAntCommand, RunTargetCommand, SendFileCommand, ShutdownCommand

public abstract class AbstractCommand
extends java.lang.Object
implements Command

Place class description here.
Author:
Matthew Inger

Method Summary

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.

Method Details

getContentLength

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

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

getReponseContentStream

public InputStream getReponseContentStream()
            throws IOException
Specified by:
getReponseContentStream in interface Command

getResponseContentLength

public long getResponseContentLength()
Specified by:
getResponseContentLength in interface Command

respond

public boolean respond(Project project,
                       long contentLength,
                       InputStream contentStream)
            throws IOException
Process any additional data from a response.
Specified by:
respond in interface Command