public Receiver registerReceiver ( Receiver receiver ) { synchronized ( receivers ) { if ( ! closed && ( maxNrofReceivers == 0 || receivers . size ( ) < maxNrofReceivers ) ) { receivers . add ( receiver ) ; } else { return null ; } return receiver ; } }
Adds a receiver so that it will receive transmitted messages .