com.baidubce.services.iothisk
Class AbstractIotHiskBceClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.iothisk.AbstractIotHiskBceClient
Direct Known Subclasses:
IotHiskClient, IotPkiManageClient

public abstract class AbstractIotHiskBceClient
extends AbstractBceClient

Abstract client for accessing the iot hisk service.


Field Summary
protected static HttpResponseHandler[] HANDLERS
          Responsible for handling httpResponses from all hisk service calls.
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
AbstractIotHiskBceClient(BceClientConfiguration config, HttpResponseHandler[] responseHandlers)
           
 
Method Summary
protected  InternalRequest createRequest(AbstractBceRequest bceRequest, HttpMethodName httpMethod, SignOptions signOptions, List<String> path, String... pathVariables)
          Creates and initializes a new request object for the specified resource.
protected static void fillInHeaderAndBody(AbstractBceRequest bceRequest, InternalRequest request)
          The method to fill the internalRequest's content field with bceRequest.
protected static byte[] toJson(AbstractBceRequest request)
          Return a json byte array representation of the object.
 
Methods inherited from class com.baidubce.AbstractBceClient
getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HANDLERS

protected static final HttpResponseHandler[] HANDLERS
Responsible for handling httpResponses from all hisk service calls.

Constructor Detail

AbstractIotHiskBceClient

public AbstractIotHiskBceClient(BceClientConfiguration config,
                                HttpResponseHandler[] responseHandlers)
Method Detail

createRequest

protected InternalRequest createRequest(AbstractBceRequest bceRequest,
                                        HttpMethodName httpMethod,
                                        SignOptions signOptions,
                                        List<String> path,
                                        String... pathVariables)
Creates and initializes a new request object for the specified resource.

Parameters:
bceRequest - The original BCE request created by the user.
httpMethod - The HTTP method to use when sending the request.
signOptions - The options for signature.
path - The options for URI prefix.
pathVariables - The optional variables used in the URI path.
Returns:
A new request object populated with endpoint, resource path and specific parameters to send.

fillInHeaderAndBody

protected static void fillInHeaderAndBody(AbstractBceRequest bceRequest,
                                          InternalRequest request)
The method to fill the internalRequest's content field with bceRequest.

Parameters:
bceRequest - The original request, as created by the user.
request - A request object, populated with endpoint, resource path, ready for callers to populate any additional headers or parameters, and execute.

toJson

protected static byte[] toJson(AbstractBceRequest request)
Return a json byte array representation of the object.

Parameters:
request - request object to be parsed as json byte array.
Returns:
a byte array representation of the object


Copyright © 2018. All rights reserved.