use of org.jacoco.core.runtime.IRemoteCommandVisitor in project jacoco by jacoco.
the class DumpTest method serveRequest.
private void serveRequest(Socket socket) throws IOException {
final RemoteControlWriter writer = new RemoteControlWriter(socket.getOutputStream());
final RemoteControlReader reader = new RemoteControlReader(socket.getInputStream());
reader.setRemoteCommandVisitor(new IRemoteCommandVisitor() {
public void visitDumpCommand(boolean dump, boolean reset) throws IOException {
writer.sendCmdOk();
}
});
while (reader.read()) {
}
}
use of org.jacoco.core.runtime.IRemoteCommandVisitor in project jacoco by jacoco.
the class ExecDumpClientTest method handleConnection.
private void handleConnection(Socket socket) throws IOException {
final RemoteControlWriter writer = new RemoteControlWriter(socket.getOutputStream());
final RemoteControlReader reader = new RemoteControlReader(socket.getInputStream());
reader.setRemoteCommandVisitor(new IRemoteCommandVisitor() {
public void visitDumpCommand(boolean dump, boolean reset) throws IOException {
dumpRequested = dump;
resetRequested = reset;
if (dump) {
writer.visitSessionInfo(new SessionInfo("TestId", 100, 200));
}
writer.sendCmdOk();
}
});
reader.read();
}
Aggregations