Class AsyncChannelGroupUtil


  • public class AsyncChannelGroupUtil
    extends java.lang.Object
    This is a utility class that enables multiple WsWebSocketContainer instances to share a single AsynchronousChannelGroup while ensuring that the group is destroyed when no longer required.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.nio.channels.AsynchronousChannelGroup register()
      Registers a user of the shared AsynchronousChannelGroup, creating it if necessary.
      static void unregister()
      Unregisters a user of the shared AsynchronousChannelGroup, shutting it down if no users remain.
      • Methods inherited from class java.lang.Object

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

      • register

        public static java.nio.channels.AsynchronousChannelGroup register()
        Registers a user of the shared AsynchronousChannelGroup, creating it if necessary.
        Returns:
        the shared AsynchronousChannelGroup
      • unregister

        public static void unregister()
        Unregisters a user of the shared AsynchronousChannelGroup, shutting it down if no users remain.