public class MasterSlaveIntegrationTest_SocketVersion {
public static MasterNode buildMaster(String configfile) throws InterruptedException
{
MasterNode masterNode = new MasterNode();
SocketMasterConnector masterConnector = new SocketMasterConnector();
JobManager jobManager = new JobManager();
JobResultMerger jobResultMerger = new JobResultMerger();
MixJobBuilder mixJobBuilder = new MixJobBuilder();
FileJobExporter fileJobExporter = new FileJobExporter();
MasterMonitor monitor = new MasterMonitor();
jobManager.setJobBuilder(mixJobBuilder);
jobManager.setJobExporter(fileJobExporter);
jobManager.setJobResultMerger(jobResultMerger);
masterConnector.setDownstreamHandler(new ObjectEncoder());
masterConnector.setUpstreamHandler(new ObjectDecoder());
masterNode.setJobManager(jobManager);
masterNode.setMasterConnector(masterConnector);
masterNode.setMonitor(monitor);