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 RuntimeData
private boolean
private RemoteControlReader
private final Socket
private RemoteControlWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the underlying socket if not closed yet.void
init()
void
run()
Processes all requests for this session until the socket is closed.void
visitDumpCommand
(boolean dump, boolean reset) Requests a execution data dump with an optional reset.void
writeExecutionData
(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 whith the connection
-
writeExecutionData
Dumps the current execution data if the connection is already initialized and the underlying socket is still open.- Parameters:
reset
- iftrue
execution data is cleared afterwards- Throws:
IOException
-
close
Closes the underlying socket if not closed yet.- Throws:
IOException
-
visitDumpCommand
Description copied from interface:IRemoteCommandVisitor
Requests a execution data dump with an optional reset.- Specified by:
visitDumpCommand
in interfaceIRemoteCommandVisitor
- Parameters:
dump
-true
if the dump should be executedreset
-true
if the reset should be executed- Throws:
IOException
- in case of problems with the remote connection
-