接口 ObjectOutput
-
- 所有超级接口:
DataOutput
public interface ObjectOutput extends DataOutput
Object output interface.
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 default voidwriteAttachments(Map<String,Object> attachments)default voidwriteEvent(Object data)voidwriteObject(Object obj)write object.default voidwriteThrowable(Object obj)The following methods are customized for the requirement of Dubbo's RPC protocol implementation.-
从接口继承的方法 org.apache.dubbo.common.serialize.DataOutput
flushBuffer, writeBool, writeByte, writeBytes, writeBytes, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
-
-
-
方法详细资料
-
writeObject
void writeObject(Object obj) throws IOException
write object.- 参数:
obj- object.- 抛出:
IOException
-
writeThrowable
default void writeThrowable(Object obj) throws IOException
The following methods are customized for the requirement of Dubbo's RPC protocol implementation. Legacy protocol implementation will try to write Map, Throwable and Null value directly to the stream, which does not meet the restrictions of all serialization protocols.See how ProtobufSerialization, KryoSerialization implemented these methods for more details.
The binding of RPC protocol and biz serialization protocol is not a good practice. Encoding of RPC protocol should be highly independent and portable, easy to cross platforms and languages, for example, like the http headers, restricting the content of headers / attachments to Ascii strings and uses ISO_8859_1 to encode them. https://tools.ietf.org/html/rfc7540#section-8.1.2
- 抛出:
IOException
-
writeEvent
default void writeEvent(Object data) throws IOException
- 抛出:
IOException
-
writeAttachments
default void writeAttachments(Map<String,Object> attachments) throws IOException
- 抛出:
IOException
-
-