Class TcpConnection
java.lang.Object
org.jacoco.agent.rt.internal.output.TcpConnection
- All Implemented Interfaces:
IRemoteCommandVisitor
Handler for a single socket based remote connection.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RuntimeDataprivate booleanprivate RemoteControlReaderprivate final Socketprivate RemoteControlWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the underlying socket if not closed yet.voidinit()voidrun()Processes all requests for this session until the socket is closed.voidvisitDumpCommand(boolean dump, boolean reset) Requests an execution data dump with an optional reset.voidwriteExecutionData(boolean reset) Dumps the current execution data if the connection is already initialized and the underlying socket is still open.
-
Field Details
-
data
-
socket
-
writer
-
reader
-
initialized
private boolean initialized
-
-
Constructor Details
-
TcpConnection
-
-
Method Details
-
init
- Throws:
IOException
-
run
Processes all requests for this session until the socket is closed.- Throws:
IOException- in case of problems with the connection
-
writeExecutionData
Dumps the current execution data if the connection is already initialized and the underlying socket is still open.- Parameters:
reset- iftrueexecution data is cleared afterwards- Throws:
IOException
-
close
Closes the underlying socket if not closed yet.- Throws:
IOException
-
visitDumpCommand
Description copied from interface:IRemoteCommandVisitorRequests an execution data dump with an optional reset.- Specified by:
visitDumpCommandin interfaceIRemoteCommandVisitor- Parameters:
dump-trueif the dump should be executedreset-trueif the reset should be executed- Throws:
IOException- in case of problems with the remote connection
-