public void addIncomingMessageListener(IncomingMessageListener l){
  incomingMessageListeners.add(l);
}

public void addIncomingMessageListener ( IncomingMessageListener l ) { incomingMessageListeners . add ( l ) ; }
listeners must be threadsafe , non - blocking and exception - free and avoid modifying the passed messages or their contents . they are invoked from the message - processing threads , so any incorrect behavior may prevent the messages from being processed properly . registration itself is not thread - safe , thus listeners should be registered between creation of the dht instance and invocation of its start ( ) method .
