1 package org.lsst.ccs.bus;
2
3 /**
4 * records the events that warn about a bus membership: connection, disconnection or suspicion of loss of connection.
5 * @implNote
6 * initially there was only one MembershipListener per bus and per CommunicationLayer : see Multiplexor in BusApplicationLayer.
7 *
8 */
9 public interface BusMembershipListener {
10 /**
11 * a new agent is connected to the bus
12 * @param agentName
13 * @param otherInfos free form string to add comments to the event
14 */
15 public void connecting(String agentName,String otherInfos );
16
17 /**
18 * an agent explicitly disconnected
19 * @param agentName
20 * @param otherInfos
21 */
22 public void disconnecting(String agentName,String otherInfos );
23
24 /**
25 * notification of an incident (sending a message to a non-existing agent and so on)
26 * @param exc
27 */
28 public void anormalEvent(Exception exc) ;
29 }