- java.lang.Object
-
- org.redkale.net.Request<SncpContext>
-
- org.redkale.net.sncp.SncpRequest
-
- 直接已知子类:
SncpMessageRequest
public class SncpRequest extends Request<SncpContext>
详情见: https://redkale.org- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected static int
READ_STATE_BODY
protected static int
READ_STATE_END
protected static int
READ_STATE_HEADER
protected static int
READ_STATE_ROUTE
protected ProtobufReader
reader
protected int
readState
-
从类继承的字段 org.redkale.net.Request
annotations, attributes, channel, context, createTime, jsonConvert, keepAlive, pipelineCompleted, pipelineCount, pipelineIndex, protobufConvert, readCompleted, traceid
-
-
构造器概要
构造器 限定符 构造器 说明 protected
SncpRequest(SncpContext context)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 byte[]
getBody()
Convert
getConvert()
SncpHeader
getHeader()
Reader
getReader()
protected Serializable
getRequestid()
ByteArray
getTempByteArray()
protected boolean
isPing()
protected void
prepare()
protected int
readHeader(ByteBuffer buffer, int pipelineHeaderLength)
返回值:Integer.MIN_VALUE: 帧数据; -1:数据不合法; 0:解析完毕; >0: 需再读取的字节数。protected void
recycle()
String
toString()
byte[]
traceBytes()
-
从类继承的方法 org.redkale.net.Request
getAnnotation, getAnnotations, getAnnotationsByType, getAttribute, getAttributes, getContext, getCreatetime, getCreateTime, getSubobject, getSubobjectIfAbsent, getSubobjects, getTraceid, isKeepAlive, newInputStream, pipeline, pipelineHeaderLength, removeAttribute, removeSubobject, setAttribute, setSubobject, traceid
-
-
-
-
字段详细资料
-
READ_STATE_ROUTE
protected static final int READ_STATE_ROUTE
- 另请参阅:
- 常量字段值
-
READ_STATE_HEADER
protected static final int READ_STATE_HEADER
- 另请参阅:
- 常量字段值
-
READ_STATE_BODY
protected static final int READ_STATE_BODY
- 另请参阅:
- 常量字段值
-
READ_STATE_END
protected static final int READ_STATE_END
- 另请参阅:
- 常量字段值
-
reader
protected final ProtobufReader reader
-
readState
protected int readState
-
-
构造器详细资料
-
SncpRequest
protected SncpRequest(SncpContext context)
-
-
方法详细资料
-
readHeader
protected int readHeader(ByteBuffer buffer, int pipelineHeaderLength)
从类复制的说明:Request
返回值:Integer.MIN_VALUE: 帧数据; -1:数据不合法; 0:解析完毕; >0: 需再读取的字节数。- 指定者:
readHeader
在类中Request<SncpContext>
- 参数:
buffer
- ByteBuffer对象pipelineHeaderLength
- 同一Channel的pipelien模式下上一个Request的header长度- 返回:
- 缺少的字节数
-
getRequestid
protected final Serializable getRequestid()
- 指定者:
getRequestid
在类中Request<SncpContext>
-
prepare
protected void prepare()
- 指定者:
prepare
在类中Request<SncpContext>
-
recycle
protected void recycle()
- 覆盖:
recycle
在类中Request<SncpContext>
-
isPing
protected boolean isPing()
-
getConvert
public Convert getConvert()
-
getReader
public Reader getReader()
-
traceBytes
public byte[] traceBytes()
-
getBody
public byte[] getBody()
-
getHeader
public SncpHeader getHeader()
-
getTempByteArray
public ByteArray getTempByteArray()
-
-