protected void onServiceInstanceUnavailable ( ServiceInstance instance ) { if ( instance == null ) { return ; } String serviceName = instance . getServiceName ( ) ; List < NotificationHandler > handlerList = new ArrayList < NotificationHandler > ( ) ; synchronized ( notificationHandlers ) { if ( notificationHandlers . containsKey ( serviceName ) ) { handlerList . addAll ( notificationHandlers . get ( serviceName ) ) ; } } for ( NotificationHandler h : handlerList ) { h . serviceInstanceUnavailable ( instance ) ; } }
Invoke the serviceInstanceUnavailable of the NotificationHandler .