Interface UdpClientEventHandler

  • All Known Implementing Classes:
    UdpClientEventAdapter

    public interface UdpClientEventHandler
    Defines event callbacks for monitoring the operation of a UdpClient.

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

    Author:
    Charles B. Kozoyed
    See Also:
    UdpClient, UdpClientEventAdapter
    • Method Detail

      • onSocketCreated

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

        void onSocketClosed​(UdpClient udpClient)
        Called when the UDP socket has been closed.
        Parameters:
        udpClient - the UDP client whose socket was closed
      • onDatagramSent

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

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

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