C
- Context子类型public abstract class Request<C extends Context>
extends java.lang.Object
详情见: https://redkale.org
限定符和类型 | 字段和说明 |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
attributes |
protected BsonConvert |
bsonConvert |
protected ObjectPool<java.nio.ByteBuffer> |
bufferPool |
protected AsyncConnection |
channel |
protected C |
context |
protected long |
createtime |
protected JsonConvert |
jsonConvert |
protected boolean |
keepAlive |
protected boolean |
more |
protected java.nio.ByteBuffer |
moredata |
protected java.nio.ByteBuffer |
readBuffer |
限定符 | 构造器和说明 |
---|---|
protected |
Request(C context,
ObjectPool<java.nio.ByteBuffer> bufferPool) |
限定符和类型 | 方法和说明 |
---|---|
<T> T |
getAttribute(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes() |
C |
getContext() |
long |
getCreatetime() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
protected <T> T |
getProperty(java.lang.String name) |
protected void |
offerReadBuffer(java.nio.ByteBuffer buffer) |
protected java.nio.ByteBuffer |
pollReadBuffer() |
protected abstract void |
prepare() |
protected abstract int |
readBody(java.nio.ByteBuffer buffer)
读取buffer,并返回读取的有效数据长度
|
protected abstract int |
readHeader(java.nio.ByteBuffer buffer)
返回值:Integer.MIN_VALUE: 帧数据; -1:数据不合法; 0:解析完毕; >0: 需再读取的字节数。
|
protected void |
recycle() |
<T> T |
removeAttribute(java.lang.String name) |
protected java.nio.ByteBuffer |
removeMoredata() |
protected <T> T |
removeProperty(java.lang.String name) |
<T> T |
setAttribute(java.lang.String name,
T value) |
protected void |
setMoredata(java.nio.ByteBuffer buffer) |
protected <T> T |
setProperty(java.lang.String name,
T value) |
protected final ObjectPool<java.nio.ByteBuffer> bufferPool
protected final BsonConvert bsonConvert
protected final JsonConvert jsonConvert
protected long createtime
protected boolean keepAlive
protected boolean more
protected java.nio.ByteBuffer moredata
protected AsyncConnection channel
protected java.nio.ByteBuffer readBuffer
protected final java.util.Map<java.lang.String,java.lang.Object> attributes
protected Request(C context, ObjectPool<java.nio.ByteBuffer> bufferPool)
protected void setMoredata(java.nio.ByteBuffer buffer)
protected java.nio.ByteBuffer removeMoredata()
protected java.nio.ByteBuffer pollReadBuffer()
protected void offerReadBuffer(java.nio.ByteBuffer buffer)
protected abstract int readHeader(java.nio.ByteBuffer buffer)
buffer
- ByteBuffer对象protected abstract int readBody(java.nio.ByteBuffer buffer)
buffer
- ByteBuffer对象protected abstract void prepare()
protected void recycle()
protected <T> T setProperty(java.lang.String name, T value)
protected <T> T getProperty(java.lang.String name)
protected <T> T removeProperty(java.lang.String name)
protected java.util.Map<java.lang.String,java.lang.Object> getProperties()
public <T> T setAttribute(java.lang.String name, T value)
public <T> T getAttribute(java.lang.String name)
public <T> T removeAttribute(java.lang.String name)
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
public C getContext()
public long getCreatetime()