Interface ConnectionCloseListener


public interface ConnectionCloseListener
Implement and register with a connection to receive notification of the connection closing.
Author:
Iain Shigeoka, Guus der Kinderen, guus@goodbytes.nl
  • Method Details

    • onConnectionClose

      @Deprecated(forRemoval=true) default void onConnectionClose(Object handback)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called when a connection is being closed.
      Parameters:
      handback - The handback object associated with the connection listener during Connection.registerCloseListener()
    • onConnectionClosing

      default CompletableFuture<Void> onConnectionClosing(@Nullable Object handback)
      Called when a connection is being closed. This method is intended to be used to start asynchronous processes. The Future that is returned is to be used to status of such an asynchronous process.
      Parameters:
      handback - The handback object associated with the connection listener during Connection.registerCloseListener()
      Returns:
      a Future representing pending completion of the event listener invocation.