Class AdvertiseListenerImpl

    • Constructor Detail

      • AdvertiseListenerImpl

        public AdvertiseListenerImpl​(MCMPHandler commHandler,
                                     AdvertiseConfiguration config,
                                     DatagramChannelFactory channelFactory)
                              throws IOException
        Constructors a new AdvertiseListenerImpl
        Parameters:
        commHandler - event handler that will be used for status and new server notifications
        config - advertise configuration
        channelFactory - a multicast channel factory
        Throws:
        IOException
    • Method Detail

      • getServer

        public AdvertisedServer getServer​(String name)
        Get AdvertiseServer server.
        Parameters:
        name - Server name to get.
      • isListening

        public boolean isListening()
        Description copied from interface: AdvertiseListener
        Returns true if listener is accepting the advertise messages; false if the listener was stopped or is experiencing network problems.
        Specified by:
        isListening in interface AdvertiseListener
      • flipBuffer

        public static void flipBuffer​(Buffer buffer)
        JDK-compatible flip operating on Buffer instead of ByteBuffer. See MODCLUSTER-743.
        Parameters:
        buffer - a buffer to flip
      • clearBuffer

        public static void clearBuffer​(Buffer buffer)
        JDK-compatible clear operating on Buffer instead of ByteBuffer. See MODCLUSTER-743.
        Parameters:
        buffer - a buffer to clear