Package com.kristensoft.kdc
Class MulticastClientEventAdapter
- java.lang.Object
-
- com.kristensoft.kdc.MulticastClientEventAdapter
-
- All Implemented Interfaces:
MulticastClientEventHandler
public class MulticastClientEventAdapter extends Object implements MulticastClientEventHandler
Convenience adapter for handlingMulticastClientevents.Provides empty implementations of all methods defined by
MulticastClientEventHandler. Applications may extend this class and override only the event callbacks they need.Using this adapter is optional and is not required for normal multicast client operation.
- Author:
- Charles B. Kozoyed
- See Also:
MulticastClient,MulticastClientEventHandler
-
-
Constructor Summary
Constructors Constructor Description MulticastClientEventAdapter()Creates a multicast client event adapter with no-op event handlers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonDatagramSent(DatagramPacket datagram)Called after a multicast datagram has been sent.voidonJoinedGroup(MulticastClient multicastClient, InetSocketAddress group)Called when the multicast client has joined a group.voidonLeftGroup(MulticastClient multicastClient, InetSocketAddress group)Called when the multicast client has left a group.voidonReceivedAgent(Agent agent)Called when an agent has been received.voidonSendingAsyncAgent(Agent agent)Called when an asynchronous agent is being sent.voidonSocketClosed(MulticastClient multicastClient)Called when the multicast socket has been closed.voidonSocketCreated(MulticastSocket socket)Called when the multicast socket has been created.
-
-
-
Method Detail
-
onSocketCreated
public void onSocketCreated(MulticastSocket socket)
Called when the multicast socket has been created.- Specified by:
onSocketCreatedin interfaceMulticastClientEventHandler- Parameters:
socket- the created multicast socket
-
onSocketClosed
public void onSocketClosed(MulticastClient multicastClient)
Called when the multicast socket has been closed.- Specified by:
onSocketClosedin interfaceMulticastClientEventHandler- Parameters:
multicastClient- the multicast client whose socket was closed
-
onDatagramSent
public void onDatagramSent(DatagramPacket datagram)
Called after a multicast datagram has been sent.- Specified by:
onDatagramSentin interfaceMulticastClientEventHandler- Parameters:
datagram- the sent datagram
-
onReceivedAgent
public void onReceivedAgent(Agent agent)
Called when an agent has been received.- Specified by:
onReceivedAgentin interfaceMulticastClientEventHandler- Parameters:
agent- the received agent
-
onJoinedGroup
public void onJoinedGroup(MulticastClient multicastClient, InetSocketAddress group)
Called when the multicast client has joined a group.- Specified by:
onJoinedGroupin interfaceMulticastClientEventHandler- Parameters:
multicastClient- the multicast client that joined the groupgroup- the multicast group that was joined
-
onLeftGroup
public void onLeftGroup(MulticastClient multicastClient, InetSocketAddress group)
Called when the multicast client has left a group.- Specified by:
onLeftGroupin interfaceMulticastClientEventHandler- Parameters:
multicastClient- the multicast client that left the groupgroup- the multicast group that was left
-
onSendingAsyncAgent
public void onSendingAsyncAgent(Agent agent)
Called when an asynchronous agent is being sent.- Specified by:
onSendingAsyncAgentin interfaceMulticastClientEventHandler- Parameters:
agent- the agent being sent
-
-