void addPolicyListener(PolicyListener policyListener){
  String listenerServiceName=policyListener.getServiceTypeName();
  Set newListeners=new HashSet();
  newListeners.add(policyListener);
  Set oldListeners=(Set)policyListenersMap.get(listenerServiceName);
  if (oldListeners != null) {
    newListeners.addAll(oldListeners);
  }
  policyListenersMap.put(listenerServiceName,newListeners);
}

void addPolicyListener ( PolicyListener policyListener ) { String listenerServiceName = policyListener . getServiceTypeName ( ) ; Set newListeners = new HashSet ( ) ; newListeners . add ( policyListener ) ; Set oldListeners = ( Set ) policyListenersMap . get ( listenerServiceName ) ; if ( oldListeners != null ) { newListeners . addAll ( oldListeners ) ; } policyListenersMap . put ( listenerServiceName , newListeners ) ; }
adds a policy listener . the policy listener would be notified whenever a policy is added / removed / changed .
