protected HttpClient getHttpClient() { if (this.httpClient == null) { HttpClientConfiguratorLoader configuratorLoader = new HttpClientConfiguratorLoader(this.state); this.httpClient = configuratorLoader.getConfigurator() .setStatePropertiesPrefix(ConfigurationKeys.SOURCE_CONN_PREFIX) .configure(this.state) .createClient(); } return this.httpClient; }
/** * Sets the value of the 'headers' field. * header key/value pairs. * @param value The value of 'headers'. * @return This builder. */ public org.apache.gobblin.http.HttpOperation.Builder setHeaders(java.util.Map<java.lang.String,java.lang.String> value) { validate(fields()[2], value); this.headers = value; fieldSetFlags()[2] = true; return this; }
/** * Clears the value of the 'keys' field. * Key of the resource on which the operation is executed. Complex key resources are identified by more than one key. Hence this field is a map as opposed to a string. The map is used to interpolate the url template in job spec. * @return This builder. */ public org.apache.gobblin.http.HttpOperation.Builder clearKeys() { keys = null; fieldSetFlags()[0] = false; return this; }
/** * Sets the value of the 'requestUrl' field. * @param value The value of 'requestUrl'. * @return This builder. */ public org.apache.gobblin.http.HttpRequestResponseRecord.Builder setRequestUrl(java.lang.String value) { validate(fields()[0], value); this.requestUrl = value; fieldSetFlags()[0] = true; return this; }
/** {@inheritDoc} */ @Override public DefaultHttpClientConfigurator configure(State state) { Config cfg = stateToConfig(state); return configure(cfg); }
/** * Checks whether the 'requestUrl' field has been set. * @return True if the 'requestUrl' field has been set, false otherwise. */ public boolean hasRequestUrl() { return fieldSetFlags()[0]; }
/** * Creates a new HttpOperation RecordBuilder by copying an existing Builder. * @param other The existing builder to copy. * @return A new HttpOperation RecordBuilder */ public static org.apache.gobblin.http.HttpOperation.Builder newBuilder(org.apache.gobblin.http.HttpOperation.Builder other) { return new org.apache.gobblin.http.HttpOperation.Builder(other); }
/** * Creates a new HttpRequestResponseRecord RecordBuilder by copying an existing Builder. * @param other The existing builder to copy. * @return A new HttpRequestResponseRecord RecordBuilder */ public static org.apache.gobblin.http.HttpRequestResponseRecord.Builder newBuilder(org.apache.gobblin.http.HttpRequestResponseRecord.Builder other) { return new org.apache.gobblin.http.HttpRequestResponseRecord.Builder(other); }
public ApacheHttpRequestBuilder(String urlTemplate, String verb, String contentType) { this.urlTemplate = urlTemplate; this.verb = verb; this.contentType = createContentType(contentType); }
/** * Sets the value of the 'body' field. * body of the http request. It must be either a plain string or a json string. * @param value The value of 'body'. * @return This builder. */ public org.apache.gobblin.http.HttpOperation.Builder setBody(java.lang.String value) { validate(fields()[3], value); this.body = value; fieldSetFlags()[3] = true; return this; }
/** * Sets the value of the 'contentType' field. * @param value The value of 'contentType'. * @return This builder. */ public org.apache.gobblin.http.HttpRequestResponseRecord.Builder setContentType(java.lang.String value) { validate(fields()[2], value); this.contentType = value; fieldSetFlags()[2] = true; return this; }
/** * Checks whether the 'headers' field has been set. * header key/value pairs. * @return True if the 'headers' field has been set, false otherwise. */ public boolean hasHeaders() { return fieldSetFlags()[2]; }
/** * Checks whether the 'statusCode' field has been set. * @return True if the 'statusCode' field has been set, false otherwise. */ public boolean hasStatusCode() { return fieldSetFlags()[3]; }
/** * Creates a new HttpOperation RecordBuilder. * @return A new HttpOperation RecordBuilder */ public static org.apache.gobblin.http.HttpOperation.Builder newBuilder() { return new org.apache.gobblin.http.HttpOperation.Builder(); }
/** * Creates a new HttpRequestResponseRecord RecordBuilder by copying an existing HttpRequestResponseRecord instance. * @param other The existing instance to copy. * @return A new HttpRequestResponseRecord RecordBuilder */ public static org.apache.gobblin.http.HttpRequestResponseRecord.Builder newBuilder(org.apache.gobblin.http.HttpRequestResponseRecord other) { return new org.apache.gobblin.http.HttpRequestResponseRecord.Builder(other); }
/** * Sets the value of the 'keys' field. * Key of the resource on which the operation is executed. Complex key resources are identified by more than one key. Hence this field is a map as opposed to a string. The map is used to interpolate the url template in job spec. * @param value The value of 'keys'. * @return This builder. */ public org.apache.gobblin.http.HttpOperation.Builder setKeys(java.util.Map<java.lang.String,java.lang.String> value) { validate(fields()[0], value); this.keys = value; fieldSetFlags()[0] = true; return this; }
/** * Checks whether the 'keys' field has been set. * Key of the resource on which the operation is executed. Complex key resources are identified by more than one key. Hence this field is a map as opposed to a string. The map is used to interpolate the url template in job spec. * @return True if the 'keys' field has been set, false otherwise. */ public boolean hasKeys() { return fieldSetFlags()[0]; }
/** * Clears the value of the 'statusCode' field. * @return This builder. */ public org.apache.gobblin.http.HttpRequestResponseRecord.Builder clearStatusCode() { fieldSetFlags()[3] = false; return this; }
/** * Creates a new HttpOperation RecordBuilder by copying an existing HttpOperation instance. * @param other The existing instance to copy. * @return A new HttpOperation RecordBuilder */ public static org.apache.gobblin.http.HttpOperation.Builder newBuilder(org.apache.gobblin.http.HttpOperation other) { return new org.apache.gobblin.http.HttpOperation.Builder(other); }
/** * Clears the value of the 'body' field. * body of the http request. It must be either a plain string or a json string. * @return This builder. */ public org.apache.gobblin.http.HttpOperation.Builder clearBody() { body = null; fieldSetFlags()[3] = false; return this; }