Source:
public CloudRouterFactory(VerifiableProperties verifiableProperties, ClusterMap clusterMap, NotificationSystem notificationSystem, SSLFactory sslFactory, AccountService accountService) throws Exception { if (verifiableProperties == null || clusterMap == null || notificationSystem == null) { throw new IllegalArgumentException("Null argument passed in"); } ClusterMapConfig clusterMapConfig = new ClusterMapConfig(verifiableProperties); if (sslFactory == null && clusterMapConfig.clusterMapSslEnabledDatacenters.length() > 0) { throw new IllegalArgumentException("NonBlockingRouter requires SSL, but sslFactory is null"); } routerConfig = new RouterConfig(verifiableProperties); if (!clusterMap.hasDatacenter(routerConfig.routerDatacenterName)) { throw new IllegalStateException( "Router datacenter " + routerConfig.routerDatacenterName + " is not part of the clustermap"); } this.clusterMap = clusterMap; this.notificationSystem = notificationSystem; this.accountService = accountService; MetricRegistry registry = clusterMap.getMetricRegistry(); routerMetrics = new NonBlockingRouterMetrics(clusterMap, routerConfig); time = SystemTime.getInstance(); KeyManagementServiceFactory kmsFactory = Utils.getObj(routerConfig.routerKeyManagementServiceFactory, verifiableProperties, new ClusterMapConfig(verifiableProperties).clusterMapClusterName, registry); kms = kmsFactory.getKeyManagementService(); CryptoServiceFactory cryptoServiceFactory = Utils.getObj(routerConfig.routerCryptoServiceFactory, verifiableProperties, registry); cryptoService = cryptoServiceFactory.getCryptoService(); cryptoJobHandler = new CryptoJobHandler(routerConfig.routerCryptoJobsWorkerCount); defaultPartitionClass = clusterMapConfig.clusterMapDefaultPartitionClass; requestHandlerPool = getRequestHandlerPool(verifiableProperties, clusterMap, notificationSystem); networkClientFactory = new LocalNetworkClientFactory((LocalRequestResponseChannel) requestHandlerPool.getChannel(), new NetworkConfig(verifiableProperties), new NetworkMetrics(registry), time); logger.info("Instantiated CloudRouterFactory"); }

Target:
public CloudRouterFactory(VerifiableProperties verifiableProperties, ClusterMap clusterMap, NotificationSystem notificationSystem, SSLFactory sslFactory, AccountService accountService) throws Exception { if (verifiableProperties == null || clusterMap == null || notificationSystem == null) { throw new IllegalArgumentException("Null argument passed in"); } this.verifiableProperties = verifiableProperties; ClusterMapConfig clusterMapConfig = new ClusterMapConfig(verifiableProperties); if (sslFactory == null && clusterMapConfig.clusterMapSslEnabledDatacenters.length() > 0) { throw new IllegalArgumentException("NonBlockingRouter requires SSL, but sslFactory is null"); } routerConfig = new RouterConfig(verifiableProperties); if (!clusterMap.hasDatacenter(routerConfig.routerDatacenterName)) { throw new IllegalStateException( "Router datacenter " + routerConfig.routerDatacenterName + " is not part of the clustermap"); } this.clusterMap = clusterMap; this.notificationSystem = notificationSystem; this.accountService = accountService; MetricRegistry registry = clusterMap.getMetricRegistry(); routerMetrics = new NonBlockingRouterMetrics(clusterMap, routerConfig); time = SystemTime.getInstance(); KeyManagementServiceFactory kmsFactory = Utils.getObj(routerConfig.routerKeyManagementServiceFactory, verifiableProperties, new ClusterMapConfig(verifiableProperties).clusterMapClusterName, registry); kms = kmsFactory.getKeyManagementService(); CryptoServiceFactory cryptoServiceFactory = Utils.getObj(routerConfig.routerCryptoServiceFactory, verifiableProperties, registry); cryptoService = cryptoServiceFactory.getCryptoService(); cryptoJobHandler = new CryptoJobHandler(routerConfig.routerCryptoJobsWorkerCount); defaultPartitionClass = clusterMapConfig.clusterMapDefaultPartitionClass; logger.info("Instantiated CloudRouterFactory"); }