@Deprecated @SpiMeta(name="compressMotan") public class CompressRpcCodec extends AbstractCodec
| Modifier and Type | Field and Description |
|---|---|
static String |
CODEC_VERSION_SWITCHER
Deprecated.
|
static String |
GROUP_CODEC_VERSION_SWITCHER
Deprecated.
|
serializations| Constructor and Description |
|---|
CompressRpcCodec()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] org,
boolean useGzip,
int minGzSize)
Deprecated.
|
Object |
decode(Channel channel,
String remoteIp,
byte[] data)
Deprecated.
decode data
|
Object |
decodeV2(Channel channel,
String remoteIp,
byte[] data)
Deprecated.
decode data
|
byte[] |
encode(Channel channel,
Object message)
Deprecated.
|
byte[] |
encodeV2(Channel channel,
Object message)
Deprecated.
|
static InputStream |
getInputStream(byte[] data)
Deprecated.
获取输入流。兼容gzip
|
static void |
putMethodSign(Provider<?> provider,
List<Method> methods)
Deprecated.
|
static void |
putMethodSign(String methodSign,
com.weibo.api.motan.protocol.rpc.CompressRpcCodec.MethodInfo methodInfo)
Deprecated.
|
createInput, createOutput, deserialize, getSerializationByNum, initAllSerialization, serializepublic static final String CODEC_VERSION_SWITCHER
public static final String GROUP_CODEC_VERSION_SWITCHER
public byte[] encode(Channel channel, Object message) throws IOException
IOExceptionpublic Object decode(Channel channel, String remoteIp, byte[] data) throws IOException
对于client端:主要是来自server端的response or exception
对于server端: 主要是来自client端的request
data - remoteIp - 用来在server端decode request时能获取到client的ip。IOExceptionpublic byte[] encodeV2(Channel channel, Object message) throws IOException
IOExceptionpublic Object decodeV2(Channel channel, String remoteIp, byte[] data) throws IOException
对于client端:主要是来自server端的response or exception
对于server端: 主要是来自client端的request
data - IOExceptionpublic static InputStream getInputStream(byte[] data)
data - public byte[] compress(byte[] org,
boolean useGzip,
int minGzSize)
throws IOException
IOExceptionpublic static void putMethodSign(Provider<?> provider, List<Method> methods)
public static void putMethodSign(String methodSign, com.weibo.api.motan.protocol.rpc.CompressRpcCodec.MethodInfo methodInfo)
Copyright © 2020. All rights reserved.