Merge branch 'wip-1750-remove-ReflectiveAccess-∂π'
This commit is contained in:
commit
47741511aa
38 changed files with 398 additions and 407 deletions
|
|
@ -3,6 +3,7 @@
|
|||
*/
|
||||
package akka.docs.serialization;
|
||||
|
||||
import akka.japi.Option;
|
||||
import akka.serialization.JSerializer;
|
||||
import akka.serialization.Serialization;
|
||||
import akka.serialization.SerializationExtension;
|
||||
|
|
@ -43,10 +44,8 @@ public class SerializationDocTestBase {
|
|||
|
||||
// "fromBinary" deserializes the given array,
|
||||
// using the type hint (if any, see "includeManifest" above)
|
||||
// into the optionally provided classLoader.
|
||||
@Override public Object fromBinary(byte[] bytes,
|
||||
Class clazz,
|
||||
ClassLoader classLoader) {
|
||||
@Override public Object fromBinaryJava(byte[] bytes,
|
||||
Class<?> clazz) {
|
||||
// Put your code that deserializes here
|
||||
//#...
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -103,3 +103,15 @@ which is done by extending ``akka.serialization.JSerializer``, like this:
|
|||
|
||||
Then you only need to fill in the blanks, bind it to a name in your :ref:`configuration` and then
|
||||
list which classes that should be serialized using it.
|
||||
|
||||
A Word About Java Serialization
|
||||
===============================
|
||||
|
||||
When using Java serialization without employing the :class:`JavaSerializer` for
|
||||
the task, you must make sure to supply a valid :class:`ExtendedActorSystem` in
|
||||
the dynamic variable ``JavaSerializer.currentSystem``. This is used when
|
||||
reading in the representation of an :class:`ActorRef` for turning the string
|
||||
representation into a real reference. :class:`DynamicVariable` is a
|
||||
thread-local variable, so be sure to have it set while deserializing anything
|
||||
which might contain actor references.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue