Wrap long lines, for pdf

This commit is contained in:
Patrik Nordwall 2013-05-29 17:20:18 +02:00
parent 7c1ab68263
commit 95366cb585
27 changed files with 108 additions and 67 deletions

View file

@ -46,9 +46,11 @@ public class DistributedPubSubMediatorTest {
LoggingAdapter log = Logging.getLogger(getContext().system(), this);
public Subscriber() {
ActorRef mediator = DistributedPubSubExtension.get(getContext().system()).mediator();
ActorRef mediator =
DistributedPubSubExtension.get(getContext().system()).mediator();
// subscribe to the topic named "content"
mediator.tell(new DistributedPubSubMediator.Subscribe("content", getSelf()), getSelf());
mediator.tell(new DistributedPubSubMediator.Subscribe("content", getSelf()),
getSelf());
}
public void onReceive(Object msg) {
@ -67,13 +69,15 @@ public class DistributedPubSubMediatorTest {
public class Publisher extends UntypedActor {
// activate the extension
ActorRef mediator = DistributedPubSubExtension.get(getContext().system()).mediator();
ActorRef mediator =
DistributedPubSubExtension.get(getContext().system()).mediator();
public void onReceive(Object msg) {
if (msg instanceof String) {
String in = (String) msg;
String out = in.toUpperCase();
mediator.tell(new DistributedPubSubMediator.Publish("content", out), getSelf());
mediator.tell(new DistributedPubSubMediator.Publish("content", out),
getSelf());
} else {
unhandled(msg);
}