com.linkedin.restli.client.Request Maven / Gradle / Ivy
/*
Copyright (c) 2012 LinkedIn Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.linkedin.restli.client;
import com.linkedin.data.schema.PathSpec;
import com.linkedin.data.template.RecordTemplate;
import com.linkedin.jersey.api.uri.UriTemplate;
import com.linkedin.restli.common.HttpMethod;
import com.linkedin.restli.common.ResourceMethod;
import com.linkedin.restli.common.ResourceProperties;
import com.linkedin.restli.common.ResourceSpec;
import com.linkedin.restli.common.RestConstants;
import com.linkedin.restli.internal.client.RestResponseDecoder;
import com.linkedin.restli.internal.common.ResourcePropertiesImpl;
import com.linkedin.restli.internal.common.URIParamUtils;
import java.net.HttpCookie;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
/**
* A type-bound Request for a resource.
*
* @param response entity template class
*
* @author Eran Leshem
*/
public class Request
{
private static final Pattern SLASH_PATTERN = Pattern.compile("/");
private final ResourceMethod _method;
private final RecordTemplate _inputRecord;
private final RestResponseDecoder _decoder;
private final Map _headers;
private final List _cookies;
private final ResourceSpec _resourceSpec;
private final ResourceProperties _resourceProperties;
private final Map _queryParams;
private final Map> _queryParamClasses; // Used for coercing query params. In case of collection or iterable, contains the type parameter class.
private final String _methodName; // needed to identify finders and actions. null for everything else
private final String _baseUriTemplate;
private final Map _pathKeys;
private final RestliRequestOptions _requestOptions;
private final List © 2015 - 2025 Weber Informatics LLC | Privacy Policy