diff --git a/mqtt/build.gradle b/mqtt/build.gradle index b28e187..eea394a 100644 --- a/mqtt/build.gradle +++ b/mqtt/build.gradle @@ -46,10 +46,10 @@ dependencies { api 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' // 请求响应模式 - api 'com.github.Sheedon.RequestResponseBinder:rr-dispatcher:0.2.7.a-alpha' + api 'com.github.Sheedon.RequestResponseBinder:rr-dispatcher:0.2.7.b-alpha' // api 'org.sheedon.requestresponsebinder:rr-dispatcher:1.0-SNAPSHOT' // android 环境下的超时处理者,java环境下正在开发中 - api 'com.github.Sheedon.RequestResponseBinder:rr-timeout-android:0.2.7.a-alpha' + api 'com.github.Sheedon.RequestResponseBinder:rr-timeout-android:0.2.7.b-alpha' // api 'org.sheedon.requestresponsebinder:rr-timeout-android:1.0-SNAPSHOT' } diff --git a/mqtt/src/main/kotlin/org/sheedon/mqtt/Response.kt b/mqtt/src/main/kotlin/org/sheedon/mqtt/Response.kt index b029f36..8525d7e 100644 --- a/mqtt/src/main/kotlin/org/sheedon/mqtt/Response.kt +++ b/mqtt/src/main/kotlin/org/sheedon/mqtt/Response.kt @@ -15,7 +15,7 @@ */ package org.sheedon.mqtt -import org.sheedon.rr.dispatcher.model.BaseResponse +import org.sheedon.rr.core.IResponse /** * Basic feedback class, the content to be included includes "feedback subject" and "feedback message body" @@ -25,17 +25,21 @@ import org.sheedon.rr.dispatcher.model.BaseResponse * @Date: 2022/1/30 11:01 上午 */ class Response @JvmOverloads constructor( - backTopic: String? = "", - message: String? = "", - body: ResponseBody? = null -) : BaseResponse(backTopic, message, body) { + private val backTopic: String? = "", + private val message: String? = "", + private val body: ResponseBody? = null +) : IResponse { override fun backTopic(): String { - return super.backTopic() ?: "" + return backTopic ?: "" } override fun message(): String { - return super.message() ?: "" + return message ?: "" + } + + override fun body(): ResponseBody { + return body ?: ResponseBody() } } \ No newline at end of file