Interface Connection


public interface Connection
Represents a connection to the endpoint. The connection can be used for an upload or a download, but not both.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the connection.
    void
    Called when the transfer has ended (from the clients point of view).
     
  • Method Details

    • getChannel

      Channel getChannel()
      Returns:
      Returns the channel that can be used to read or write data (whether read or write is enabled depends on if you requested a download or an upload).
    • done

      void done() throws IOException
      Called when the transfer has ended (from the clients point of view). The connection can now validate with the server that everything is OK. E.g., in case of an upload this is where we confirm that the file was uploaded correctly onto the server.
      Throws:
      IOException - If the transfer should fail.
    • close

      void close() throws IOException
      Close the connection. This will release any resources consumed by this connection.
      Throws:
      IOException - If unable to close the connection.