本文整理汇总了Java中akka.actor.AbstractLoggingActor类的典型用法代码示例。如果您正苦于以下问题:Java AbstractLoggingActor类的具体用法?Java AbstractLoggingActor怎么用?Java AbstractLoggingActor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractLoggingActor类属于akka.actor包,在下文中一共展示了AbstractLoggingActor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldLogResponseFromCoffeeHouse
import akka.actor.AbstractLoggingActor; //导入依赖的package包/类
@Test
public void shouldLogResponseFromCoffeeHouse() {
new JavaTestKit(system) {{
interceptInfoLogMessage(this, "stub response", 1, () -> {
new CoffeeHouseApp(system) {
@Override
protected ActorRef createCoffeeHouse() {
return createStubActor("stub-coffee-house", () -> new AbstractLoggingActor() {
@Override
public Receive createReceive() {
return receiveBuilder().matchAny(o -> getSender().tell("stub response", getSelf())).build();
}
});
}
};
});
}};
}
示例2: printerProps
import akka.actor.AbstractLoggingActor; //导入依赖的package包/类
private static Props printerProps(ActorRef coffeeHouse) {
return Props.create(AbstractLoggingActor.class, () -> new AbstractLoggingActor() {
@Override
public Receive createReceive() {
return receiveBuilder().matchAny(o -> log().info(o.toString())).build();
}
{
coffeeHouse.tell("Brew Coffee", self());
}
});
}
示例3: printerProps
import akka.actor.AbstractLoggingActor; //导入依赖的package包/类
private static Props printerProps(ActorRef coffeeHouse) {
return Props.create(AbstractLoggingActor.class, () -> {
return new AbstractLoggingActor() {
@Override
public Receive createReceive() {
return receiveBuilder().matchAny(o -> log().info(o.toString())).build();
}
{
coffeeHouse.tell("Brew Coffee", self());
}
};
});
}
示例4: printerProps
import akka.actor.AbstractLoggingActor; //导入依赖的package包/类
private static Props printerProps(ActorRef coffeeHouse) {
return Props.create(AbstractLoggingActor.class, () -> new AbstractLoggingActor() {
{
coffeeHouse.tell("Brew Coffee", self());
receive(ReceiveBuilder.
matchAny(o -> log().info(o.toString())).build()
);
}
});
}
示例5: shouldLogResponseFromCoffeeHouse
import akka.actor.AbstractLoggingActor; //导入依赖的package包/类
@Test
public void shouldLogResponseFromCoffeeHouse() {
new JavaTestKit(system) {{
interceptInfoLogMessage(this, "stub response", 1, () -> {
new CoffeeHouseApp(system) {
@Override
protected ActorRef createCoffeeHouse() {
return createStubActor("stub-coffee-house", () -> new AbstractLoggingActor() {{
receive(ReceiveBuilder.matchAny(o -> sender().tell("stub response", self())).build());
}});
}
};
});
}};
}
示例6: printerProps
import akka.actor.AbstractLoggingActor; //导入依赖的package包/类
private static Props printerProps(ActorRef coffeeHouse) {
return Props.create(AbstractLoggingActor.class, () -> new AbstractLoggingActor() {
@Override
public Receive createReceive() {
return receiveBuilder().matchAny(o -> log().info(o.toString())).build();
}
{
coffeeHouse.tell("Brew Coffee", getSelf());
}
});
}