@Test(expected=IllegalArgumentException.class) public void testInstantiateWithoutEndpointParam() throws Exception { factory.instantiate(parameters); }
@Override public StreamingFacade instantiate(Map<String, String> parameters) { try { Preconditions.checkArgument(parameters.containsKey(IMPORT_PROJECT_STREAM_ENDPOINT_URL), "unknown projects stream endpoint url, required parameter '%s' is missing!", IMPORT_PROJECT_STREAM_ENDPOINT_URL); boolean compress = false; if (parameters.containsKey(IMPORT_PROJECT_STREAM_COMPRESS)) { compress = Boolean.parseBoolean(parameters.get(IMPORT_PROJECT_STREAM_COMPRESS)); } return new UrlStreamingFacade(parameters.get(IMPORT_PROJECT_STREAM_ENDPOINT_URL), compress, Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_READ_TIMEOUT, DNET_SERVICE_READ_TIMEOUT_DEFAULT_VALUE, parameters)), Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_CONNECTION_TIMEOUT, DNET_SERVICE_CONNECTION_TIMEOUT_DEFAULT_VALUE, parameters))); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
UrlStreamingFacadeFactory implements ServiceFacadeFactory<StreamingFacade> { @Override public StreamingFacade instantiate(Map<String, String> parameters) { try { Preconditions.checkArgument(parameters.containsKey(IMPORT_PROJECT_STREAM_ENDPOINT_URL), "unknown projects stream endpoint url, required parameter '%s' is missing!", IMPORT_PROJECT_STREAM_ENDPOINT_URL); boolean compress = false; if (parameters.containsKey(IMPORT_PROJECT_STREAM_COMPRESS)) { compress = Boolean.parseBoolean(parameters.get(IMPORT_PROJECT_STREAM_COMPRESS)); } return new UrlStreamingFacade(parameters.get(IMPORT_PROJECT_STREAM_ENDPOINT_URL), compress, Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_READ_TIMEOUT, DNET_SERVICE_READ_TIMEOUT_DEFAULT_VALUE, parameters)), Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_CONNECTION_TIMEOUT, DNET_SERVICE_CONNECTION_TIMEOUT_DEFAULT_VALUE, parameters))); } catch (MalformedURLException e) { throw new RuntimeException(e); } } }
UrlStreamingFacadeFactory implements ServiceFacadeFactory<StreamingFacade> { @Override public StreamingFacade instantiate(Map<String, String> parameters) { try { Preconditions.checkArgument(parameters.containsKey(IMPORT_PROJECT_STREAM_ENDPOINT_URL), "unknown projects stream endpoint url, required parameter '%s' is missing!", IMPORT_PROJECT_STREAM_ENDPOINT_URL); boolean compress = false; if (parameters.containsKey(IMPORT_PROJECT_STREAM_COMPRESS)) { compress = Boolean.parseBoolean(parameters.get(IMPORT_PROJECT_STREAM_COMPRESS)); } return new UrlStreamingFacade(parameters.get(IMPORT_PROJECT_STREAM_ENDPOINT_URL), compress, Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_READ_TIMEOUT, DNET_SERVICE_READ_TIMEOUT_DEFAULT_VALUE, parameters)), Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_CONNECTION_TIMEOUT, DNET_SERVICE_CONNECTION_TIMEOUT_DEFAULT_VALUE, parameters))); } catch (MalformedURLException e) { throw new RuntimeException(e); } }  }
UrlStreamingFacadeFactory implements ServiceFacadeFactory<StreamingFacade> { @Override public StreamingFacade instantiate(Map<String, String> parameters) { try { Preconditions.checkArgument(parameters.containsKey(IMPORT_PROJECT_STREAM_ENDPOINT_URL), "unknown projects stream endpoint url, required parameter '%s' is missing!", IMPORT_PROJECT_STREAM_ENDPOINT_URL); boolean compress = false; if (parameters.containsKey(IMPORT_PROJECT_STREAM_COMPRESS)) { compress = Boolean.parseBoolean(parameters.get(IMPORT_PROJECT_STREAM_COMPRESS)); } return new UrlStreamingFacade(parameters.get(IMPORT_PROJECT_STREAM_ENDPOINT_URL), compress, Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_READ_TIMEOUT, DNET_SERVICE_READ_TIMEOUT_DEFAULT_VALUE, parameters)), Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_CONNECTION_TIMEOUT, DNET_SERVICE_CONNECTION_TIMEOUT_DEFAULT_VALUE, parameters))); } catch (MalformedURLException e) { throw new RuntimeException(e); } }  @Override StreamingFacade instantiate(Map<String, String> parameters); }
UrlStreamingFacadeFactory implements ServiceFacadeFactory<StreamingFacade> { @Override public StreamingFacade instantiate(Map<String, String> parameters) { try { Preconditions.checkArgument(parameters.containsKey(IMPORT_PROJECT_STREAM_ENDPOINT_URL), "unknown projects stream endpoint url, required parameter '%s' is missing!", IMPORT_PROJECT_STREAM_ENDPOINT_URL); boolean compress = false; if (parameters.containsKey(IMPORT_PROJECT_STREAM_COMPRESS)) { compress = Boolean.parseBoolean(parameters.get(IMPORT_PROJECT_STREAM_COMPRESS)); } return new UrlStreamingFacade(parameters.get(IMPORT_PROJECT_STREAM_ENDPOINT_URL), compress, Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_READ_TIMEOUT, DNET_SERVICE_READ_TIMEOUT_DEFAULT_VALUE, parameters)), Integer.parseInt(WorkflowRuntimeParameters.getParamValue(DNET_SERVICE_CLIENT_CONNECTION_TIMEOUT, DNET_SERVICE_CONNECTION_TIMEOUT_DEFAULT_VALUE, parameters))); } catch (MalformedURLException e) { throw new RuntimeException(e); } }  @Override StreamingFacade instantiate(Map<String, String> parameters);  }