public void serviceActive ( ReceivableService receivableService ) { for ( ReceivableEvent receivableEvent : receivableService . getReceivableEvents ( ) ) { Set < ServiceID > servicesReceivingEvent = eventID2serviceIDs . get ( receivableEvent . getEventType ( ) ) ; if ( servicesReceivingEvent == null ) { servicesReceivingEvent = new HashSet < ServiceID > ( ) ; Set < ServiceID > anotherSet = eventID2serviceIDs . putIfAbsent ( receivableEvent . getEventType ( ) , servicesReceivingEvent ) ; if ( anotherSet != null ) { servicesReceivingEvent = anotherSet ; } } synchronized ( servicesReceivingEvent ) { servicesReceivingEvent . add ( receivableService . getService ( ) ) ; } } }
Informs the filter that a receivable service is now active . For the events related with the service and if there are no other services bound then events of such event type should now not be filtered .