Collection < Class < ? extends ManagerEvent > > expandEvents ( Collection < Class < ? extends ManagerEvent > > events ) { Collection < Class < ? extends ManagerEvent > > requiredEvents = new HashSet <> ( ) ; for ( Class < ? extends ManagerEvent > event : events ) { requiredEvents . add ( event ) ; if ( event . equals ( BridgeEvent . class ) ) { requiredEvents . add ( UnlinkEvent . class ) ; requiredEvents . add ( LinkEvent . class ) ; } } return requiredEvents ; }
in order to get Bridge Events we must subscribe to Link and Unlink events for asterisk 1 . 4 so we automatically add them if the Bridge Event is required