private void addProbe( CommunicationManager cManager, ProbeReceiver receiver, Class<?> probeClass, int port) throws IOException { prManager.addReceiver(receiver); cManager.send(new Object[] {MessageType.ADD_PROBE, probeClass, port}); cManager.waitForConfirm(); }
public void executeExperiment(CommunicationManager cManager) { try { dbManager.newExperiment(obCollector, expType); prManager.startReceivers(); cManager.send(MessageType.START_EXPERIMENT); cManager.waitForConfirm(); try { Thread.sleep(5000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } prManager.closeReceivers(); cManager.send(MessageType.END_EXPERIMENT); cManager.waitForConfirm(); } catch (IOException ex) { } }