src/java.net.http/share/classes/jdk/internal/net/http/HttpConnection.java
branchhttp-client-branch
changeset 56335 7e56c39fa1fa
parent 56252 e4b05854c51f
child 56437 f8b3f053cfbb
equal deleted inserted replaced
56334:ca27c57cb857 56335:7e56c39fa1fa
   344      * Closes this connection, by returning the socket to its connection pool.
   344      * Closes this connection, by returning the socket to its connection pool.
   345      */
   345      */
   346     @Override
   346     @Override
   347     public abstract void close();
   347     public abstract void close();
   348 
   348 
   349     abstract void shutdownInput() throws IOException;
       
   350 
       
   351     abstract void shutdownOutput() throws IOException;
       
   352 
       
   353     // Support for WebSocket/RawChannelImpl which unfortunately
       
   354     // still depends on synchronous read/writes.
       
   355     // It should be removed when RawChannelImpl moves to using asynchronous APIs.
       
   356     abstract static class DetachedConnectionChannel implements Closeable {
       
   357         DetachedConnectionChannel() {}
       
   358         abstract SocketChannel channel();
       
   359         abstract long write(ByteBuffer[] buffers, int start, int number)
       
   360                 throws IOException;
       
   361         abstract void shutdownInput() throws IOException;
       
   362         abstract void shutdownOutput() throws IOException;
       
   363         abstract ByteBuffer read() throws IOException;
       
   364         @Override
       
   365         public abstract void close();
       
   366         @Override
       
   367         public String toString() {
       
   368             return this.getClass().getSimpleName() + ": " + channel().toString();
       
   369         }
       
   370     }
       
   371 
       
   372     // Support for WebSocket/RawChannelImpl which unfortunately
       
   373     // still depends on synchronous read/writes.
       
   374     // It should be removed when RawChannelImpl moves to using asynchronous APIs.
       
   375     abstract DetachedConnectionChannel detachChannel();
       
   376 
       
   377     abstract FlowTube getConnectionFlow();
   349     abstract FlowTube getConnectionFlow();
   378 
   350 
   379     /**
   351     /**
   380      * A publisher that makes it possible to publish (write)
   352      * A publisher that makes it possible to publish (write)
   381      * ordered (normal priority) and unordered (high priority)
   353      * ordered (normal priority) and unordered (high priority)