package io.elssa.net;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public abstract class MessageRouterBase {

    private List<MessageListener> listeners
        = Collections.synchronizedList(new ArrayList<>());

    /**
     * Adds a message listener (consumer) to this MessageRouter.  Listeners
     * receive messages that are published by this MessageRouter.
     *
     * @param listener {@link MessageListener} that will consume messages
     * published by this MessageRouter.
     */
    public void addListener(MessageListener listener) {
        listeners.add(listener);
    }

    public void removeListener(MessageListener listener) {
        listeners.remove(listener);
    }

    public void onConnnect(NetworkEndpoint endpoint) {
        for (MessageListener listener : listeners) {
            listener.onConnect(endpoint);
        }
    }

    public void onDisconnect(NetworkEndpoint endpoint) {
        for (MessageListener listener : listeners) {
            listener.onDisconnect(endpoint);
        }
    }

    public void onMessage(ElssaMessage msg) {
        for (MessageListener listener : listeners) {
            listener.onMessage(msg);
        }
    }
}

@@ -719,37 +719,40 @@
 r);%0A    %7D%0A%0A    p
-ublic
+rotected
  void onConnnect
@@ -889,37 +889,40 @@
   %7D%0A    %7D%0A%0A    p
-ublic
+rotected
  void onDisconne
@@ -1068,29 +1068,32 @@
     %7D%0A%0A    p
-ublic
+rotected
  void onMess

Update message passing method visibility