com.baidu.driver4j.bns.http
类 AbstractHttpRequestExecutor

java.lang.Object
  继承者 com.baidu.driver4j.bns.http.AbstractHttpRequestExecutor
直接已知子类:
SimpleHttpRequestExecutor

public abstract class AbstractHttpRequestExecutor
extends Object

Pre-implements serialization of Protobuf objects and deserialization of Protobuf objects.

从以下版本开始:
1.0.0
作者:
xiemalin

字段摘要
static String CONTENT_TYPE_SERIALIZED_OBJECT
          Default content type: "application/x-java-serialized-object"
protected static String ENCODING_GZIP
           
protected static String HTTP_HEADER_ACCEPT_ENCODING
           
protected static String HTTP_HEADER_ACCEPT_LANGUAGE
           
protected static String HTTP_HEADER_CONTENT_ENCODING
           
protected static String HTTP_HEADER_CONTENT_LENGTH
           
protected static String HTTP_HEADER_CONTENT_TYPE
           
protected static String HTTP_METHOD_GET
           
protected static String HTTP_METHOD_POST
           
 
构造方法摘要
AbstractHttpRequestExecutor()
           
 
方法摘要
 int getConnectTimeout()
           
 String getContentType()
          Return the content type to use for sending HTTP invoker requests.
 int getReadTimeout()
           
 boolean isAcceptGzipEncoding()
          Return whether to accept GZIP encoding, that is, whether to send the HTTP "Accept-Encoding" header with "gzip" as value.
 void setAcceptGzipEncoding(boolean acceptGzipEncoding)
          Set whether to accept GZIP encoding, that is, whether to send the HTTP "Accept-Encoding" header with "gzip" as value.
 void setConnectTimeout(int connectTimeout)
           
 void setContentType(String contentType)
          Specify the content type to use for sending HTTP invoker requests.
 void setReadTimeout(int readTimeout)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

CONTENT_TYPE_SERIALIZED_OBJECT

public static final String CONTENT_TYPE_SERIALIZED_OBJECT
Default content type: "application/x-java-serialized-object"

另请参见:
常量字段值

HTTP_METHOD_POST

protected static final String HTTP_METHOD_POST
另请参见:
常量字段值

HTTP_METHOD_GET

protected static final String HTTP_METHOD_GET
另请参见:
常量字段值

HTTP_HEADER_ACCEPT_LANGUAGE

protected static final String HTTP_HEADER_ACCEPT_LANGUAGE
另请参见:
常量字段值

HTTP_HEADER_ACCEPT_ENCODING

protected static final String HTTP_HEADER_ACCEPT_ENCODING
另请参见:
常量字段值

HTTP_HEADER_CONTENT_ENCODING

protected static final String HTTP_HEADER_CONTENT_ENCODING
另请参见:
常量字段值

HTTP_HEADER_CONTENT_TYPE

protected static final String HTTP_HEADER_CONTENT_TYPE
另请参见:
常量字段值

HTTP_HEADER_CONTENT_LENGTH

protected static final String HTTP_HEADER_CONTENT_LENGTH
另请参见:
常量字段值

ENCODING_GZIP

protected static final String ENCODING_GZIP
另请参见:
常量字段值
构造方法详细信息

AbstractHttpRequestExecutor

public AbstractHttpRequestExecutor()
方法详细信息

setContentType

public void setContentType(String contentType)
Specify the content type to use for sending HTTP invoker requests.

Default is "application/x-java-serialized-object".


getContentType

public String getContentType()
Return the content type to use for sending HTTP invoker requests.


setAcceptGzipEncoding

public void setAcceptGzipEncoding(boolean acceptGzipEncoding)
Set whether to accept GZIP encoding, that is, whether to send the HTTP "Accept-Encoding" header with "gzip" as value.

Default is "true". Turn this flag off if you do not want GZIP response compression even if enabled on the HTTP server.


isAcceptGzipEncoding

public boolean isAcceptGzipEncoding()
Return whether to accept GZIP encoding, that is, whether to send the HTTP "Accept-Encoding" header with "gzip" as value.


setConnectTimeout

public void setConnectTimeout(int connectTimeout)

getConnectTimeout

public int getConnectTimeout()

setReadTimeout

public void setReadTimeout(int readTimeout)

getReadTimeout

public int getReadTimeout()


Copyright © 2016. All rights reserved.