/** * Releases the service, decrementing the usage count for the * ServiceReference being tracked. * Notifies listeners that the service is no longer available. */ public void releaseService(){ if(myReference != null){ untrackWithEvent(myReference); } }
private void removeService(ServiceReference ref){ myReferences.remove(ref); if(myReferences.isEmpty()){ untrackWithEvent(ref); }else{ track(myReferences.get(0)); } }