Interface PortAutoCloseable

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void close()
      Closes the channel so that no more messages could be sent to it.
      default boolean isClosed()
      Tests whether the channel has been closed and no more messages await in the channel.
    • Method Detail

      • close

        default void close()
        Closes the channel so that no more messages could be sent to it. Messages already sent to the channel will still be received.
        Specified by:
        close in interface java.lang.AutoCloseable
      • isClosed

        default boolean isClosed()
        Tests whether the channel has been closed and no more messages await in the channel. If this method returns true all future calls to receive are guaranteed to return null, and calls to receive on a primitive channel will throw a EOFException.
        Returns:
        true if the channels has been closed and no more messages will be received; false otherwise.