#22903 Fix code snippeds

* move scala and java sources out of paradox sources
* replace relative paths with $code$ and $akka$
* fix broken includes
This commit is contained in:
Martynas Mickevičius 2017-05-11 11:59:28 +03:00
parent 7bee495749
commit 81df4ff417
384 changed files with 1609 additions and 1602 deletions

View file

@ -0,0 +1,33 @@
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package jdocs.actor;
//#imports
import akka.actor.AbstractActor;
import akka.event.Logging;
import akka.event.LoggingAdapter;
//#imports
//#my-actor
public class MyActor extends AbstractActor {
private final LoggingAdapter log = Logging.getLogger(getContext().getSystem(), this);
@Override
public Receive createReceive() {
return receiveBuilder()
.match(String.class, s -> {
log.info("Received String message: {}", s);
//#my-actor
//#reply
getSender().tell(s, getSelf());
//#reply
//#my-actor
})
.matchAny(o -> log.info("received unknown message"))
.build();
}
}
//#my-actor