doc: Cleanup serialization.md, #24717
This commit is contained in:
parent
ef09dca732
commit
f18d8af484
9 changed files with 156 additions and 82 deletions
|
|
@ -6,6 +6,7 @@ package jdocs.serialization;
|
|||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
import akka.actor.typed.javadsl.Behaviors;
|
||||
import akka.cluster.Cluster;
|
||||
import akka.testkit.javadsl.TestKit;
|
||||
import org.junit.Test;
|
||||
|
|
@ -188,4 +189,15 @@ public class SerializationDocTest {
|
|||
|
||||
TestKit.shutdownActorSystem(system);
|
||||
}
|
||||
|
||||
public void demonstrateTheProgrammaticAPITyped() {
|
||||
// #programmatic-typed
|
||||
akka.actor.typed.ActorSystem<Void> system =
|
||||
akka.actor.typed.ActorSystem.create(Behaviors.empty(), "example");
|
||||
|
||||
// Get the Serialization Extension
|
||||
Serialization serialization =
|
||||
SerializationExtension.get(akka.actor.typed.javadsl.Adapter.toClassic(system));
|
||||
// #programmatic-typed
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue