I am trying to figure out a way to use an AsynchronousSocketChannel
along with a serialization technology.
My ultimate aim is to register a callback (specifying the target type) and it invoke my callback when a full-object has been de-serialized.
However, every serialization technology I've looked at relies on deserialisation in a blocking fashion.
Is there any serialization technology that will supports streaming deserialisation via proper use of AsynchronousSocketChannel
(ie without converting it to a blocking InputStream
first)
Alternatively, is there an efficient size delimited wrapper around AsynchronousSocketChannel
that has been written that will give me a ByteArray, it seems silly to have to write this myself with the pools of ByteBuffers etc...