类 BaseRequest<T>
java.lang.Object
com.walker.tcp.data.BaseRequest<T>
- 所有已实现的接口:
Request<T>,Serializable
- 直接已知子类:
AbstractStringRequest
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明返回商业数据,这些通常只包括业务部分内容返回请求与响应约定的消息ID,通常该值由业务事先约定好,在双向通信中,都可以使用。getName()返回业务对应的请求终端ID,如:设备唯一ID等返回业务协议中,约定的协议名称,即:接口名称,如:001代表登录请求,002代表登录响应int返回本次连接通道的id值long返回系统接收到该消息的时间戳boolean是否该请求需要响应?voidsetMessageId(String messageId) voidvoidsetProtocolResolverId(int protocolResolverId) voidsetSessionId(String sessionId) toString()从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 com.walker.tcp.Request
fromSource
-
构造器详细资料
-
BaseRequest
public BaseRequest()
-
-
方法详细资料
-
getSessionId
从接口复制的说明:Request返回本次连接通道的id值- 指定者:
getSessionId在接口中Request<T>- 返回:
-
setSessionId
-
setName
-
getName
从接口复制的说明:Request返回业务对应的请求终端ID,如:设备唯一ID等 -
getTimeStamp
public long getTimeStamp()从接口复制的说明:Request返回系统接收到该消息的时间戳- 指定者:
getTimeStamp在接口中Request<T>- 返回:
-
getProtocolNum
从接口复制的说明:Request返回业务协议中,约定的协议名称,即:接口名称,如:001代表登录请求,002代表登录响应- 指定者:
getProtocolNum在接口中Request<T>- 返回:
-
getBusinessContent
从接口复制的说明:Request返回商业数据,这些通常只包括业务部分内容- 指定者:
getBusinessContent在接口中Request<T>- 返回:
-
getMessageId
从接口复制的说明:Request返回请求与响应约定的消息ID,通常该值由业务事先约定好,在双向通信中,都可以使用。- 指定者:
getMessageId在接口中Request<T>- 返回:
-
setMessageId
-
toString
-
isRequireResponse
public boolean isRequireResponse()从接口复制的说明:Request是否该请求需要响应? 对于象:指令下达这样的场景中,下达后客户端也是会回应(请求)确认收到,此时这种请求是不需要服务端响应的。 服务端可以通过该确认,更新系统状态。- 指定者:
isRequireResponse在接口中Request<T>- 返回:
-
getProtocolResolverId
public int getProtocolResolverId()- 指定者:
getProtocolResolverId在接口中Request<T>
-
setProtocolResolverId
public void setProtocolResolverId(int protocolResolverId) - 指定者:
setProtocolResolverId在接口中Request<T>
-