接口 ObjectInput
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 default Map<String,Object>readAttachments()default ObjectreadEvent()ObjectreadObject()已过时。<T> TreadObject(Class<T> cls)read object<T> TreadObject(Class<T> cls, Type type)read objectdefault ThrowablereadThrowable()The following methods are customized for the requirement of Dubbo's RPC protocol implementation.
-
-
-
方法详细资料
-
readObject
@Deprecated Object readObject() throws IOException, ClassNotFoundException
已过时。Consider usereadObject(Class)orreadObject(Class, Type)where possible- 返回:
- object
- 抛出:
IOException- if an I/O error occursClassNotFoundException- if an ClassNotFoundException occurs
-
readObject
<T> T readObject(Class<T> cls) throws IOException, ClassNotFoundException
read object- 参数:
cls- object class- 返回:
- object
- 抛出:
IOException- if an I/O error occursClassNotFoundException- if an ClassNotFoundException occurs
-
readObject
<T> T readObject(Class<T> cls, Type type) throws IOException, ClassNotFoundException
read object- 参数:
cls- object classtype- object type- 返回:
- object
- 抛出:
IOException- if an I/O error occursClassNotFoundException- if an ClassNotFoundException occurs
-
readThrowable
default Throwable readThrowable() throws IOException, ClassNotFoundException
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
-
readEvent
default Object readEvent() throws IOException, ClassNotFoundException
-
readAttachments
default Map<String,Object> readAttachments() throws IOException, ClassNotFoundException
-
-