if (cs == null) {
throw new ObjectNotFoundException("Connector with id " + id + " doesnt exists in map of " + mapName);
}
// call the destroy method on the processor or receiver service
cs.destroy();
}
private ConnectorService getConnector(String id, Map<String,ConnectorService> map) {
Validate.notEmpty(id);