public boolean unlink ( D declaration , ServiceReference < S > declarationBinderRef ) { S declarationBinder = bindersManager . getDeclarationBinder ( declarationBinderRef ) ; try { declarationBinder . removeDeclaration ( declaration ) ; } catch ( BinderException e ) { LOG . debug ( declarationBinder + " throw an exception when removing of it the Declaration " + declaration , e ) ; declaration . unhandle ( declarationBinderRef ) ; return false ; } finally { declaration . unbind ( declarationBinderRef ) ; } return true ; }
Try to unlink the declaration from the importerService referenced by the ServiceReference . return true if they have been cleanly unlink false otherwise .