org.flexunit.ant
Class FlexUnitSocketThread

java.lang.Object
  extended by org.flexunit.ant.FlexUnitSocketThread
All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Object>

public class FlexUnitSocketThread
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Object>

Managing class for the FlexUnitSocketServer and report aggregation.


Field Summary
private static java.lang.String END_OF_FAILURE
           
private static java.lang.String END_OF_IGNORE
           
private static java.lang.String END_OF_SUCCESS
           
private  java.io.File reportDir
           
private  java.util.Map<java.lang.String,Report> reports
           
private  FlexUnitSocketServer server
           
private static java.lang.String SUITE_ATTRIBUTE
           
 
Constructor Summary
FlexUnitSocketThread(FlexUnitSocketServer server, java.io.File reportDir, java.util.Map<java.lang.String,Report> reports)
           
 
Method Summary
 java.lang.Object call()
          When excuted, the thread will start the socket server and wait for inbound data and delegate reporting
private  void parseInboundMessages()
          Used to iterate and interpret byte sent over the socket.
private  org.dom4j.Document parseReport(java.lang.String report)
          Parse the parameter String and returns it as a document
private  void processTestReport(java.lang.String xml)
          Process the test report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

END_OF_SUCCESS

private static final java.lang.String END_OF_SUCCESS
See Also:
Constant Field Values

END_OF_FAILURE

private static final java.lang.String END_OF_FAILURE
See Also:
Constant Field Values

END_OF_IGNORE

private static final java.lang.String END_OF_IGNORE
See Also:
Constant Field Values

SUITE_ATTRIBUTE

private static final java.lang.String SUITE_ATTRIBUTE
See Also:
Constant Field Values

reportDir

private java.io.File reportDir

server

private FlexUnitSocketServer server

reports

private java.util.Map<java.lang.String,Report> reports
Constructor Detail

FlexUnitSocketThread

public FlexUnitSocketThread(FlexUnitSocketServer server,
                            java.io.File reportDir,
                            java.util.Map<java.lang.String,Report> reports)
Method Detail

call

public java.lang.Object call()
                      throws java.lang.Exception
When excuted, the thread will start the socket server and wait for inbound data and delegate reporting

Specified by:
call in interface java.util.concurrent.Callable<java.lang.Object>
Throws:
java.lang.Exception

parseInboundMessages

private void parseInboundMessages()
                           throws java.io.IOException
Used to iterate and interpret byte sent over the socket.

Throws:
java.io.IOException

processTestReport

private void processTestReport(java.lang.String xml)
Process the test report.

Parameters:
report - String that represents a complete test

parseReport

private org.dom4j.Document parseReport(java.lang.String report)
Parse the parameter String and returns it as a document

Parameters:
report - String
Returns:
Document