- java.lang.Object
-
- org.redkale.mq.spi.MessageServlet
-
- 所有已实现的接口:
MessageProcessor
- 直接已知子类:
HttpMessageServlet
,SncpMessageServlet
public abstract class MessageServlet extends Object implements MessageProcessor
一个Service对应一个MessageProcessor详情见: https://redkale.org
- 从以下版本开始:
- 2.1.0
- 作者:
- zhangjx
-
-
构造器概要
构造器 构造器 说明 MessageServlet(MessageClient messageClient, Context context, Service service, Servlet servlet, String topic)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected abstract Request
createRequest(Context context, MessageRecord message)
protected abstract Response
createResponse(Context context, Request request)
Context
getContext()
Service
getService()
Servlet
getServlet()
String
getTopic()
protected abstract void
onError(Response response, MessageRecord message, Throwable t)
void
process(MessageRecord message, long time)
-
-
-
构造器详细资料
-
MessageServlet
public MessageServlet(MessageClient messageClient, Context context, Service service, Servlet servlet, String topic)
-
-
方法详细资料
-
process
public void process(MessageRecord message, long time)
- 指定者:
process
在接口中MessageProcessor
-
createRequest
protected abstract Request createRequest(Context context, MessageRecord message)
-
onError
protected abstract void onError(Response response, MessageRecord message, Throwable t)
-
getContext
public Context getContext()
-
getService
public Service getService()
-
getServlet
public Servlet getServlet()
-
getTopic
public String getTopic()
-
-