Interface ObjectInput
- All Superinterfaces:
DataInput
Object input interface.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringConsider usereadObject(Class)orreadObject(Class, Type)where possible<T> TreadObject(Class<T> cls) read object<T> TreadObject(Class<T> cls, Type type) read objectdefault ThrowableThe following methods are customized for the requirement of Dubbo's RPC protocol implementation.
-
Method Details
-
readObject
Consider usereadObject(Class)orreadObject(Class, Type)where possible- Returns:
- object
- Throws:
IOException- if an I/O error occursClassNotFoundException- if an ClassNotFoundException occurs
-
readObject
read object- Parameters:
cls- object class- Returns:
- object
- Throws:
IOException- if an I/O error occursClassNotFoundException- if an ClassNotFoundException occurs
-
readObject
read object- Parameters:
cls- object classtype- object type- Returns:
- object
- Throws:
IOException- if an I/O error occursClassNotFoundException- if an ClassNotFoundException occurs
-
readThrowable
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
- Throws:
IOExceptionClassNotFoundException
-
readEvent
- Throws:
IOExceptionClassNotFoundException
-
readAttachments
- Throws:
IOExceptionClassNotFoundException
-