public class DefaultRequest<T extends BaseRequest> extends Object implements Request<T>
This class is only intended for internal use inside the AWS client libraries. Callers shouldn't ever interact directly with objects of this class.
| 构造器和说明 |
|---|
DefaultRequest(String serviceName)
Constructs a new DefaultRequest with the specified service name and no
specified original, user facing request object.
|
DefaultRequest(T originalRequest)
Constructs a new DefaultRequest with the original, user facing request object.
|
DefaultRequest(T originalRequest,
String serviceName)
Constructs a new DefaultRequest with the specified service name and the
original, user facing request object.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addHeader(String name,
String value)
Sets the specified header for this request.
|
void |
addMultiPartFile(String name,
File file)
Adds the specified file to this request
|
void |
addMultiPartFile(String name,
FileParam fileParam)
Adds the specified FileParam to this request
|
void |
addMultiPartFile(String name,
InputStream in)
Adds the specified file to this request
|
void |
addParameter(String name,
String value)
Adds the specified request parameter to this request.
|
void |
addParameters(String name,
List<String> values)
Adds the specified request parameter and list of values to this request.
|
void |
assignYos()
assign this request to yos
|
InputStream |
getContent()
Returns the optional stream containing the payload data to include for
this request.
|
YopContentType |
getContentType()
http content-type
|
URI |
getEndpoint()
Returns the service endpoint to which this request should be sent.
|
Map<String,String> |
getHeaders()
Returns a map of all the headers included in this request.
|
HttpMethodName |
getHttpMethod()
Returns the HTTP method (GET, POST, etc) to use when sending this
request.
|
Map<String,List<MultiPartFile>> |
getMultiPartFiles()
Return a map of all multipart files in this request
|
T |
getOriginalRequest()
Returns the original, user facing request object which this internal
request object is representing.
|
T |
getOriginalRequestObject()
Returns the original, user facing request object which this internal
request object is representing.
|
Map<String,List<String>> |
getParameters()
Returns a map of all parameters in this request.
|
String |
getRequestId()
current request-id
|
String |
getResourcePath()
Returns the path to the resource being requested.
|
String |
getServiceName() |
int |
getTimeOffset()
Returns the optional value for time offset for this request.
|
boolean |
isYosRequest() |
void |
setContent(InputStream content)
Sets the optional stream containing the payload data to include for this
request.
|
void |
setContentType(YopContentType contentType)
set the http content-type
|
void |
setEndpoint(URI endpoint)
Sets the service endpoint to which this equest should be sent.
|
void |
setHeaders(Map<String,String> headers)
Sets all headers, clearing any existing ones.
|
void |
setHttpMethod(HttpMethodName httpMethod)
Sets the HTTP method (GET, POST, etc) to use when sending this request.
|
void |
setMultiPartFiles(Map<String,List<MultiPartFile>> multiPartFiles)
Sets multipart files, clearing any existing values.
|
void |
setParameters(Map<String,List<String>> parameters)
Sets all parameters, clearing any existing values.
|
void |
setResourcePath(String resourcePath)
Sets the path to the resource being requested.
|
void |
setTimeOffset(int timeOffset)
Sets the optional value for time offset for this request.
|
String |
toString() |
Request<T> |
withMultiPartFile(String name,
File file)
Adds the specified file to this request, and returns the uodated request object
|
Request<T> |
withParameter(String name,
String value)
Adds the specified request parameter to this request, and returns the
updated request object.
|
Request<T> |
withTimeOffset(int timeOffset)
Sets the optional value for time offset for this request.
|
public DefaultRequest(T originalRequest, String serviceName)
serviceName - The name of the service to which this request is being sent.originalRequest - The original, user facing, AWS request being represented by
this internal request object.public DefaultRequest(String serviceName)
serviceName - The name of the service to which this request is being sent.public DefaultRequest(T originalRequest)
@param - originalRequest The original, user facing, AWS request being represented by
this internal request object.public T getOriginalRequest()
public void addHeader(String name, String value)
RequestaddHeader 在接口中 Request<T extends BaseRequest>name - The name of the header to set.value - The header's value.Request.addHeader(String, String)public String getRequestId()
RequestgetRequestId 在接口中 Request<T extends BaseRequest>public YopContentType getContentType()
RequestgetContentType 在接口中 Request<T extends BaseRequest>public void setContentType(YopContentType contentType)
RequestsetContentType 在接口中 Request<T extends BaseRequest>contentType - the YopContentTypepublic Map<String,String> getHeaders()
RequestgetHeaders 在接口中 Request<T extends BaseRequest>Request.getHeaders()public void setResourcePath(String resourcePath)
RequestsetResourcePath 在接口中 Request<T extends BaseRequest>resourcePath - The path to the resource being requested.Request.setResourcePath(String)public String getResourcePath()
RequestgetResourcePath 在接口中 Request<T extends BaseRequest>Request.getResourcePath()public void addParameter(String name, String value)
RequestaddParameter 在接口中 Request<T extends BaseRequest>name - The name of the request parameter.value - The value of the request parameter.Request.addParameter(String, String)public void addParameters(String name, List<String> values)
RequestaddParameters 在接口中 Request<T extends BaseRequest>name - The name of the request parameter.values - The value of the request parameter.Request.addParameters(String, List)public Map<String,List<String>> getParameters()
RequestgetParameters 在接口中 Request<T extends BaseRequest>Request.getParameters()public Request<T> withParameter(String name, String value)
RequestwithParameter 在接口中 Request<T extends BaseRequest>name - The name of the request parameter.value - The value of the request parameter.Request.withParameter(java.lang.String, java.lang.String)public Map<String,List<MultiPartFile>> getMultiPartFiles()
RequestgetMultiPartFiles 在接口中 Request<T extends BaseRequest>public void setMultiPartFiles(Map<String,List<MultiPartFile>> multiPartFiles)
RequestNote that List values within the parameters Map must use an implementation that supports null values.
setMultiPartFiles 在接口中 Request<T extends BaseRequest>multiPartFiles - the request multipart files.public Request<T> withMultiPartFile(String name, File file)
RequestwithMultiPartFile 在接口中 Request<T extends BaseRequest>name - The name of the file parameterfile - The filepublic void addMultiPartFile(String name, File file)
RequestaddMultiPartFile 在接口中 Request<T extends BaseRequest>name - The name of the file parameterfile - The filepublic void addMultiPartFile(String name, InputStream in)
RequestaddMultiPartFile 在接口中 Request<T extends BaseRequest>name - The name of the file parameterin - the filepublic void addMultiPartFile(String name, FileParam fileParam)
RequestaddMultiPartFile 在接口中 Request<T extends BaseRequest>name - The name of the file parameterfileParam - the fileParampublic HttpMethodName getHttpMethod()
RequestgetHttpMethod 在接口中 Request<T extends BaseRequest>Request.getHttpMethod()public void setHttpMethod(HttpMethodName httpMethod)
RequestsetHttpMethod 在接口中 Request<T extends BaseRequest>httpMethod - The HTTP method to use when sending this request.Request.setHttpMethod(HttpMethodName)public void setEndpoint(URI endpoint)
RequestsetEndpoint 在接口中 Request<T extends BaseRequest>endpoint - The service endpoint to which this request should be sent.Request.setEndpoint(java.net.URI)public URI getEndpoint()
RequestgetEndpoint 在接口中 Request<T extends BaseRequest>Request.getEndpoint()public String getServiceName()
getServiceName 在接口中 Request<T extends BaseRequest>Request.getServiceName()public InputStream getContent()
RequestgetContent 在接口中 Request<T extends BaseRequest>Request.getContent()public void setContent(InputStream content)
RequestsetContent 在接口中 Request<T extends BaseRequest>content - The optional stream containing the payload data to include for
this request.Request.setContent(InputStream)public void setHeaders(Map<String,String> headers)
RequestsetHeaders 在接口中 Request<T extends BaseRequest>headers - headersRequest.setHeaders(java.util.Map)public void setParameters(Map<String,List<String>> parameters)
RequestNote that List values within the parameters Map must use an implementation that supports null values.
setParameters 在接口中 Request<T extends BaseRequest>parameters - the request parameters.Request.setParameters(java.util.Map)public int getTimeOffset()
RequestgetTimeOffset 在接口中 Request<T extends BaseRequest>Request.getTimeOffset()public void setTimeOffset(int timeOffset)
RequestsetTimeOffset 在接口中 Request<T extends BaseRequest>timeOffset - The optional value for time offset (in seconds) for this request.Request.setTimeOffset(int)public Request<T> withTimeOffset(int timeOffset)
RequestwithTimeOffset 在接口中 Request<T extends BaseRequest>timeOffset - The optional value for time offset (in seconds) for this request.Request.setTimeOffset(int)public T getOriginalRequestObject()
RequestgetOriginalRequestObject 在接口中 Request<T extends BaseRequest>T.public boolean isYosRequest()
isYosRequest 在接口中 Request<T extends BaseRequest>public void assignYos()
RequestassignYos 在接口中 Request<T extends BaseRequest>Copyright © 2024. All rights reserved.