Modifier and Type | Field and Description |
---|---|
private boolean | |
private Object | |
private Object | |
private Object | |
private Socket | |
private InputStream | |
private OutputStream |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public void | |
public boolean | isOpen()
Implements abstract com. |
public byte[] | readPacket()
Implements abstract com. |
public void | writePacket(byte[]
The packet to write to the target VM. b)Implements abstract com. |
closed | back to summary |
---|---|
private boolean closed |
closeLock | back to summary |
---|---|
private Object closeLock |
receiveLock | back to summary |
---|---|
private Object receiveLock |
sendLock | back to summary |
---|---|
private Object sendLock |
socket | back to summary |
---|---|
private Socket socket |
socketInput | back to summary |
---|---|
private InputStream socketInput |
socketOutput | back to summary |
---|---|
private OutputStream socketOutput |
SocketConnection | back to summary |
---|---|
pack-priv SocketConnection(Socket socket) throws IOException |
close | back to summary |
---|---|
public void close() throws IOException Implements abstract com. Doc from com. Closes this connection. If the connection is already closed then invoking this method
has no effect. After a connection is closed, any further attempt
calls to Any thread currently blocked in an I/O operation ( This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.
|
isOpen | back to summary |
---|---|
public boolean isOpen() Implements abstract com. Doc from com. Tells whether or not this connection is open.
|
readPacket | back to summary |
---|---|
public byte[] readPacket() throws IOException Implements abstract com. Doc from com. Reads a packet from the target VM. Attempts to read a JDWP packet from the target VM. A read operation may block indefinitely and only returns when it reads all bytes of a packet, or in the case of a transport service that is based on a stream-oriented communication protocol, the end of stream is encountered. Reading a packet does not do any integrity checking on
the packet aside from a check that the length of the packet
(as indicated by the value of the Returns a byte array of a length equal to the length
of the received packet, or a byte array of length 0 when an
end of stream is encountered. If end of stream is encountered
after some, but not all bytes of a packet, are read then it
is considered an I/O error and an This method may be invoked at any time. If another thread has
already initiated a
|
writePacket | back to summary |
---|---|
public void writePacket(byte[] b) throws IOException Implements abstract com. Doc from com. Writes a packet to the target VM. Attempts to write, or send, a JDWP packet to the target VM. A write operation only returns after writing the entire packet to the target VM. Writing the entire packet does not mean the entire packet has been transmitted to the target VM but rather that all bytes have been written to the transport service. A transport service based on a TCP/IP connection may, for example, buffer some or all of the packet before transmission on the network. The byte array provided to this method should be laid out
as per the
JDWP specification. That is, all fields in the packet
are in big endian order. The first byte, that is element
Writing a packet does not do any integrity checking on
the packet aside from checking the packet length. Checking
the packet length requires checking that the value of the
A write operation may block or may complete immediately. The exact circumstances when an operation blocks depends on the transport service. In the case of a TCP/IP connection to the target VM, the writePacket method may block if there is network congestion or there is insufficient space to buffer the packet in the underlying network system. This method may be invoked at any time. If another thread has already initiated a write operation upon this Connection then a subsequent invocation of this method will block until the first operation is complete.
|