A Connection represents a bi-directional communication channel between a debugger and a target VM. A Connection is created when {@link com.sun.jdi.connect.spi.TransportService TransportService}establishes a connection and successfully handshakes with a target VM. A TransportService implementation provides a reliable JDWP packet transportation service and consequently a Connection provides a reliable flow of JDWP packets between the debugger and the target VM. A Connection is stream oriented, that is, the JDWP packets written to a connection are read by the target VM in the order in which they were written. Similiarly packets written to a Connection by the target VM are read by the debugger in the order in which they were written.
A connection is either open or closed. It is open upon creation, and remains open until it is closed. Once closed, it remains closed, and any attempt to invoke an I/O operation upon it will cause a {@link ClosedConnectionException} to be thrown. A connection canbe tested by invoking the {@link #isOpen isOpen} method.
A Connection is safe for access by multiple concurrent threads, although at most one thread may be reading and at most one thread may be writing at any given time.
@since 1.5
|
|
|
|