- java.lang.Object
-
- org.redkale.net.sncp.SncpHeader
-
public class SncpHeader extends Object
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 static int
HEADER_SUBSIZE
static byte
KEEPALIVE_OFF
static byte
KEEPALIVE_ON
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static int
calcHeaderSize(SncpClientRequest request)
static int
calcHeaderSize(SncpRequest request)
boolean
checkValid(SncpHeader other)
static SncpHeader
create(InetSocketAddress clientSncpAddress, Uint128 serviceid, String serviceName, Uint128 actionid, String methodName)
Uint128
getActionid()
byte[]
getAddrBytes()
InetSocketAddress
getAddress()
int
getAddrPort()
int
getBodyLength()
int
getRetcode()
Long
getSeqid()
Uint128
getServiceid()
int
getSncpVersion()
long
getTimestamp()
String
getTraceid()
boolean
isKeepAlive()
boolean
isValid()
static SncpHeader
read(ByteBuffer buffer, int headerSize)
static SncpHeader
read(ByteArray array, int headerSize)
String
toString()
ByteArray
writeTo(ByteArray array, SncpClientRequest clientRequest, byte keepAlive, int bodyLength, int retcode)
ByteArray
writeTo(ByteArray array, SncpResponse response, byte keepAlive, int bodyLength, int retcode)
-
-
-
方法详细资料
-
create
public static SncpHeader create(InetSocketAddress clientSncpAddress, Uint128 serviceid, String serviceName, Uint128 actionid, String methodName)
-
read
public static SncpHeader read(ByteBuffer buffer, int headerSize)
-
read
public static SncpHeader read(ByteArray array, int headerSize)
-
writeTo
public ByteArray writeTo(ByteArray array, SncpClientRequest clientRequest, byte keepAlive, int bodyLength, int retcode)
-
writeTo
public ByteArray writeTo(ByteArray array, SncpResponse response, byte keepAlive, int bodyLength, int retcode)
-
getAddress
public InetSocketAddress getAddress()
-
isValid
public boolean isValid()
-
isKeepAlive
public boolean isKeepAlive()
-
checkValid
public boolean checkValid(SncpHeader other)
-
calcHeaderSize
public static int calcHeaderSize(SncpClientRequest request)
-
calcHeaderSize
public static int calcHeaderSize(SncpRequest request)
-
getSeqid
public Long getSeqid()
-
getServiceid
public Uint128 getServiceid()
-
getSncpVersion
public int getSncpVersion()
-
getActionid
public Uint128 getActionid()
-
getAddrBytes
public byte[] getAddrBytes()
-
getAddrPort
public int getAddrPort()
-
getTimestamp
public long getTimestamp()
-
getTraceid
public String getTraceid()
-
getRetcode
public int getRetcode()
-
getBodyLength
public int getBodyLength()
-
-