限定符和类型 | 字段和说明 |
---|---|
protected HttpConnect |
client
Low level client for sending requests to AWS services.
|
protected ClientConfiguration |
clientConfiguration
The client configuration
|
protected URI |
endpoint
The service endpoint to which this client will send requests.
|
protected URI |
endpoint4Upload
CDN上传加速域名
|
protected int |
timeOffset
Optional offset (in seconds) to use when signing requests
|
构造器和说明 |
---|
SCSWebServiceClient(ClientConfiguration clientConfiguration)
Constructs a new SCSWebServiceClient object using the specified
configuration and request metric collector.
|
限定符和类型 | 方法和说明 |
---|---|
protected <T> HttpRequest |
convertToHttpRequest(Request<T> request,
HttpMethodName methodName)
已过时。
|
protected ExecutionContext |
createExecutionContext()
This method exists only for backward compatiblity reason, so
that clients compiled against the older version of this class
won't get
NoSuchMethodError at runtime. |
protected ExecutionContext |
createExecutionContext(Request<?> req) |
int |
getTimeOffset()
Returns the optional value for time offset for this client.
|
void |
setConfiguration(ClientConfiguration clientConfiguration) |
void |
setEndpoint(String endpoint)
Overrides the default endpoint for this client.
|
void |
setEndpoint4Upload(String endpoint) |
void |
setTimeOffset(int timeOffset)
Sets the optional value for time offset for this client.
|
void |
shutdown()
Shuts down this client object, releasing any resources that might be held
open.
|
SCSWebServiceClient |
withTimeOffset(int timeOffset)
Sets the optional value for time offset for this client.
|
protected URI endpoint
protected URI endpoint4Upload
protected ClientConfiguration clientConfiguration
protected HttpConnect client
protected int timeOffset
public SCSWebServiceClient(ClientConfiguration clientConfiguration)
clientConfiguration
- The client configuration for this client.requestMetricCollector
- optional request metric collector to be used at the http
client level; can be null.public void setEndpoint(String endpoint) throws IllegalArgumentException
This method is not threadsafe. Endpoints should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit.
Callers can pass in just the endpoint (ex: "ec2.amazonaws.com") or a full
URL, including the protocol (ex: "https://ec2.amazonaws.com"). If the
protocol is not specified here, the default protocol from this client's
ClientConfiguration
will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912
endpoint
- The endpoint (ex: "ec2.amazonaws.com") or a full URL,
including the protocol (ex: "https://ec2.amazonaws.com") of
the region specific AWS endpoint this client will communicate
with.IllegalArgumentException
- If any problems are detected with the specified endpoint.public void setEndpoint4Upload(String endpoint) throws IllegalArgumentException
public void setConfiguration(ClientConfiguration clientConfiguration)
public void shutdown()
@Deprecated protected <T> HttpRequest convertToHttpRequest(Request<T> request, HttpMethodName methodName)
request
- The request to convert.methodName
- The HTTP method (GET, PUT, DELETE, HEAD) to use in the
converted HttpRequest object.protected final ExecutionContext createExecutionContext(Request<?> req)
protected final ExecutionContext createExecutionContext()
NoSuchMethodError
at runtime. However,
calling this methods would effectively ignore and disable the
request metric collector, if any, specified at the request
level. Request metric collector specified at the service
client or AWS SDK level will still be honored.public void setTimeOffset(int timeOffset)
timeOffset
- The optional value for time offset (in seconds) for this client.public SCSWebServiceClient withTimeOffset(int timeOffset)
timeOffset
- The optional value for time offset (in seconds) for this client.public int getTimeOffset()
Copyright © 2016. All rights reserved.