Skip to content

hadielmougy/actrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actrix

Actor model for java

Usage

<dependency>
    <groupId>io.constx</groupId>
    <artifactId>actrix</artifactId>
    <version>0.1.1</version>
</dependency>

Usage

ReceiverActor receiverActor = new ReceiverActor("receiver-actor");
ActorRef receiverRef = system.register(receiverActor);
ActorRef senderRef = system.register(new SenderActor(receiverRef));
senderRef.send(new IncrementMessage());

.......


class ReceiverActor extends Actor {

    public ReceiverActor(String id) {
        super(id);
    }

    @Override
    public void receive(ActorMessage actorMessage) {
        doSomething(actorMessage);
}
   

Examples

https://github.com/hadielmougy/actrix/tree/main/src/test/java/io/constx/actrix/examples/