Class ConnectionUtils


  • public class ConnectionUtils
    extends java.lang.Object
    Author:
    Stuart Douglas
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void cleanClose​(org.xnio.StreamConnection connection, java.io.Closeable... additional)
      Cleanly close a connection, by shutting down and flushing writes and then draining reads.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • cleanClose

        public static void cleanClose​(org.xnio.StreamConnection connection,
                                      java.io.Closeable... additional)
        Cleanly close a connection, by shutting down and flushing writes and then draining reads.

        If this fails the connection is forcibly closed.

        Parameters:
        connection - The connection
        additional - Any additional resources to close once the connection has been closed