Interface MulticastClientEventHandler

  • All Known Implementing Classes:
    MulticastClientEventAdapter

    public interface MulticastClientEventHandler
    Defines event callbacks for monitoring the operation of a MulticastClient.

    Implementations may be registered with a multicast client to receive notifications for socket lifecycle events, multicast group membership, datagram sends, and agent communication events. Implementing this interface is optional and is not required for normal multicast client operation.

    Author:
    Charles B. Kozoyed
    See Also:
    MulticastClient, MulticastClientEventAdapter
    • Method Detail

      • onSocketCreated

        void onSocketCreated​(MulticastSocket socket)
        Called when the multicast socket has been created.
        Parameters:
        socket - the created multicast socket
      • onSocketClosed

        void onSocketClosed​(MulticastClient multicastClient)
        Called when the multicast socket has been closed.
        Parameters:
        multicastClient - the multicast client whose socket was closed
      • onDatagramSent

        void onDatagramSent​(DatagramPacket datagram)
        Called after a multicast datagram has been sent.
        Parameters:
        datagram - the sent datagram
      • onReceivedAgent

        void onReceivedAgent​(Agent agent)
        Called when an agent has been received.
        Parameters:
        agent - the received agent
      • onJoinedGroup

        void onJoinedGroup​(MulticastClient multicastClient,
                           InetSocketAddress group)
        Called when the multicast client has joined a group.
        Parameters:
        multicastClient - the multicast client that joined the group
        group - the multicast group that was joined
      • onLeftGroup

        void onLeftGroup​(MulticastClient multicastClient,
                         InetSocketAddress group)
        Called when the multicast client has left a group.
        Parameters:
        multicastClient - the multicast client that left the group
        group - the multicast group that was left
      • onSendingAsyncAgent

        void onSendingAsyncAgent​(Agent agent)
        Called when an asynchronous agent is being sent.
        Parameters:
        agent - the agent being sent