类 AbstractMessageClient
- java.lang.Object
-
- org.opoo.ootp.client.impl.AbstractMessageClient
-
- 所有已实现的接口:
MessageClient
- 直接已知子类:
V1MessageClientImpl,V2MessageClientImpl
public abstract class AbstractMessageClient extends java.lang.Object implements MessageClient
-
-
字段概要
字段 修饰符和类型 字段 说明 protected java.lang.StringbasePathprotected org.apache.http.impl.client.CloseableHttpClienthttpClientprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapper-
从接口继承的字段 org.opoo.ootp.client.MessageClient
DEFAULT_BUFFER_SIZE, DEFAULT_LIMIT
-
-
构造器概要
构造器 构造器 说明 AbstractMessageClient(java.net.URI endpoint, org.apache.http.impl.client.CloseableHttpClient httpClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, java.lang.String basePath)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 protected org.apache.http.HttpEntitycodecDecode(org.apache.http.HttpEntity entity, ExsMetadata metadata)protected org.apache.http.HttpEntitycodecEncode(org.apache.http.HttpEntity entity, ExsMetadata metadata)ExsCodecgetCodec()protected ExsMessagegetMessage(java.lang.String id, java.util.function.Function<java.lang.String,java.lang.String> idToPath)protected booleanhasContent(org.apache.http.client.methods.CloseableHttpResponse response)protected intprocessIds(java.util.List<java.lang.String> ids, java.util.function.Consumer<java.lang.Object> requestConfigurer, java.lang.String path, java.util.function.Function<org.apache.http.client.methods.HttpPost,java.lang.Integer> resultHandler)protected voidprocessUri(org.apache.http.client.methods.HttpUriRequest request)voidsetCodec(ExsCodec codec)protected static org.apache.http.HttpEntitytoEntity(ExsBody body, ExsMetadata metadata)protected voidvalidateResponse(org.apache.http.client.methods.CloseableHttpResponse response)protected voidvalidateResponse(org.apache.http.client.methods.CloseableHttpResponse response, java.util.function.Supplier<java.lang.Boolean> parseErrorBody, java.lang.String baseExceptionMessage)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.opoo.ootp.client.MessageClient
ack, ack, getMessage, getMessageBody, getMessageInfo, poll, poll, poll, ret, ret, ret, send, send, send, send, send
-
-
-
-
方法详细资料
-
getCodec
public ExsCodec getCodec()
-
setCodec
public void setCodec(ExsCodec codec)
-
processUri
protected void processUri(org.apache.http.client.methods.HttpUriRequest request)
-
toEntity
protected static org.apache.http.HttpEntity toEntity(ExsBody body, ExsMetadata metadata) throws java.io.IOException
- 抛出:
java.io.IOException
-
codecEncode
protected org.apache.http.HttpEntity codecEncode(org.apache.http.HttpEntity entity, ExsMetadata metadata) throws java.io.IOException- 抛出:
java.io.IOException
-
codecDecode
protected org.apache.http.HttpEntity codecDecode(org.apache.http.HttpEntity entity, ExsMetadata metadata) throws java.io.IOException- 抛出:
java.io.IOException
-
validateResponse
protected void validateResponse(org.apache.http.client.methods.CloseableHttpResponse response) throws java.io.IOException, OotpException- 抛出:
java.io.IOExceptionOotpException
-
validateResponse
protected void validateResponse(org.apache.http.client.methods.CloseableHttpResponse response, java.util.function.Supplier<java.lang.Boolean> parseErrorBody, java.lang.String baseExceptionMessage) throws java.io.IOException, OotpException- 参数:
response-parseErrorBody- 是否需要解析错误消息的主体baseExceptionMessage- 错误消息基本消息- 抛出:
java.io.IOExceptionOotpException
-
hasContent
protected boolean hasContent(org.apache.http.client.methods.CloseableHttpResponse response)
-
getMessage
protected ExsMessage getMessage(java.lang.String id, java.util.function.Function<java.lang.String,java.lang.String> idToPath) throws OotpException
- 抛出:
OotpException
-
processIds
protected int processIds(java.util.List<java.lang.String> ids, java.util.function.Consumer<java.lang.Object> requestConfigurer, java.lang.String path, java.util.function.Function<org.apache.http.client.methods.HttpPost,java.lang.Integer> resultHandler) throws OotpException- 抛出:
OotpException
-
-