tests/utils/monitor/org/apache/test/MockServerThread.java
/**
     * This method opens the input file and streams it out to the given
     * outputstream
     * 
     * @param outputStream
     *            the stream to output the file to
     */
This method opens the input file and streams it out to the given
outputstream

@param outputStream
the stream to output the file to
This method opens the input file and streams it out to the given outputstream @param outputStream the stream to output the file to
private void sendResponseToClient( ) throws FileNotFoundException,
            IOException
    {
        Response responseMessage=getResponseMessage( );
        if (responseMessage!=null)
        {
            ResponseSender responseSender=new ResponseSender(responseMessage,outputStream, this);
            addChild(responseSender);
            Thread responseSenderThread=new Thread(responseSender);
            responseSenderThread.start( );
        }
        else
        {
            System.err.println("We've run out of responses to send back to the client");
            close();
            throw new IOException("No more responses to send to clients");
        }
    }
private void sendResponseToClient ( ) throws FileNotFoundException , IOException { Response responseMessage = getResponseMessage ( ) ; if ( responseMessage != null ) { ResponseSender responseSender = new ResponseSender ( responseMessage , outputStream , this ) ; addChild ( responseSender ) ; Thread responseSenderThread = new Thread ( responseSender ) ; responseSenderThread . start ( ) ; } else { System . err . println ( "We've run out of responses to send back to the client" ) ; close ( ) ; throw new IOException ( "No more responses to send to clients" ) ; } }
This method opens the input file and streams it out to the given
 outputstream
This method opens the input file and streams it out to the given outputstream
// Create a seperate thread and return