jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java
changeset 45564 0149773a140c
parent 45532 ff4b62180768
equal deleted inserted replaced
45563:ece4ae6beba3 45564:0149773a140c
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    30 /**
    30 /**
    31  * A connection between a debugger and a target VM which it debugs.
    31  * A connection between a debugger and a target VM which it debugs.
    32  *
    32  *
    33  * <p> A Connection represents a bi-directional communication channel
    33  * <p> A Connection represents a bi-directional communication channel
    34  * between a debugger and a target VM. A Connection is created when
    34  * between a debugger and a target VM. A Connection is created when
    35  * {@link com.sun.jdi.connect.spi.TransportService TransportService}
    35  * {@link TransportService TransportService} establishes a connection
    36  * establishes a connection and successfully handshakes with a target
    36  * and successfully handshakes with a target VM. A TransportService
    37  * VM. A TransportService implementation provides a reliable
    37  * implementation provides a reliable JDWP packet transportation service
    38  * JDWP packet transportation service and consequently a Connection
    38  * and consequently a Connection provides a reliable flow of JDWP packets
    39  * provides a reliable flow of JDWP packets between the debugger
    39  * between the debugger and the target VM. A Connection is stream oriented,
    40  * and the target VM. A Connection is stream oriented, that is, the
    40  * that is, the JDWP packets written to a connection are read by the target VM
    41  * JDWP packets written to a connection are read by the target VM
    41  * in the order in which they were written. Similarly packets written
    42  * in the order in which they were written. Similiarly packets written
       
    43  * to a Connection by the target VM are read by the debugger in the
    42  * to a Connection by the target VM are read by the debugger in the
    44  * order in which they were written.
    43  * order in which they were written.
    45  *
    44  *
    46  * <p> A connection is either open or closed. It is open upon creation,
    45  * <p> A connection is either open or closed. It is open upon creation,
    47  * and remains open until it is closed. Once closed, it remains closed,
    46  * and remains open until it is closed. Once closed, it remains closed,
    53  * although at most one thread may be reading and at most one thread may
    52  * although at most one thread may be reading and at most one thread may
    54  * be writing at any given time.
    53  * be writing at any given time.
    55  *
    54  *
    56  * @since 1.5
    55  * @since 1.5
    57  */
    56  */
    58 
       
    59 public abstract class Connection {
    57 public abstract class Connection {
    60 
    58 
    61     /**
    59     /**
    62      * Reads a packet from the target VM.
    60      * Reads a packet from the target VM.
    63      *
    61      *