akka.actor.AbstractLoggingActor Java Examples

The following examples show how to use akka.actor.AbstractLoggingActor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CoffeeHouseAppTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 6 votes vote down vote up
@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();
                        }
                    });
                }
            };
        });
    }};
}
 
Example #2
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}
 
Example #3
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}
 
Example #4
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
            }
        };
    });
}
 
Example #5
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}
 
Example #6
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
            }
        };
    });
}
 
Example #7
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}
 
Example #8
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}
 
Example #9
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}
 
Example #10
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
            }
        };
    });
}
 
Example #11
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
            }
        };
    });
}
 
Example #12
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}
 
Example #13
Source File: CoffeeHouseApp.java    From oreilly-reactive-architecture-student with Apache License 2.0 5 votes vote down vote up
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());
        }
    });
}