private void refreshServiceRoute(int type,String svcName,String svcVersion){
  try {
switch (type) {
case SMSObjectListener.DELETE:
      if (serviceRoutes.containsKey(svcName)) {
        removeService(svcName);
      }
    break;
case SMSObjectListener.ADD:
  if (!serviceRoutes.containsKey(svcName)) {
    serviceRoutes.put(svcName,addService(getServiceManager(),svcName,svcVersion));
  }
break;
case SMSObjectListener.MODIFY:
try {
write.lock();
removeService(svcName);
serviceRoutes.put(svcName,addService(getServiceManager(),svcName,svcVersion));
}
  finally {
write.unlock();
}
break;
default :
throw new IllegalArgumentException("Unknown modification type: " + type);
}
}
 catch (SSOException|SMSException e) {
debug.error("Could not update SMS REST services for change to " + svcName,e);
}
}

private void refreshServiceRoute ( int type , String svcName , String svcVersion ) { try { switch ( type ) { case SMSObjectListener . DELETE : if ( serviceRoutes . containsKey ( svcName ) ) { removeService ( svcName ) ; } break ; case SMSObjectListener . ADD : if ( ! serviceRoutes . containsKey ( svcName ) ) { serviceRoutes . put ( svcName , addService ( getServiceManager ( ) , svcName , svcVersion ) ) ; } break ; case SMSObjectListener . MODIFY : try { write . lock ( ) ; removeService ( svcName ) ; serviceRoutes . put ( svcName , addService ( getServiceManager ( ) , svcName , svcVersion ) ) ; } finally { write . unlock ( ) ; } break ; default : throw new IllegalArgumentException ( "Unknown modification type: " + type ) ; } } catch ( SSOException | SMSException e ) { debug . error ( "Could not update SMS REST services for change to " + svcName , e ) ; } }
applies the event type to the service routes .
