diff --git a/.gradle/7.6/checksums/checksums.lock b/.gradle/7.6/checksums/checksums.lock
index badea3d..26ff9a1 100644
Binary files a/.gradle/7.6/checksums/checksums.lock and b/.gradle/7.6/checksums/checksums.lock differ
diff --git a/.gradle/7.6/executionHistory/executionHistory.bin b/.gradle/7.6/executionHistory/executionHistory.bin
index 23b44b6..fafe61b 100644
Binary files a/.gradle/7.6/executionHistory/executionHistory.bin and b/.gradle/7.6/executionHistory/executionHistory.bin differ
diff --git a/.gradle/7.6/executionHistory/executionHistory.lock b/.gradle/7.6/executionHistory/executionHistory.lock
index 5e35069..2bcd2c9 100644
Binary files a/.gradle/7.6/executionHistory/executionHistory.lock and b/.gradle/7.6/executionHistory/executionHistory.lock differ
diff --git a/.gradle/7.6/fileHashes/fileHashes.bin b/.gradle/7.6/fileHashes/fileHashes.bin
index 270d138..33eeaa2 100644
Binary files a/.gradle/7.6/fileHashes/fileHashes.bin and b/.gradle/7.6/fileHashes/fileHashes.bin differ
diff --git a/.gradle/7.6/fileHashes/fileHashes.lock b/.gradle/7.6/fileHashes/fileHashes.lock
index 8f29b77..0563726 100644
Binary files a/.gradle/7.6/fileHashes/fileHashes.lock and b/.gradle/7.6/fileHashes/fileHashes.lock differ
diff --git a/.gradle/7.6/fileHashes/resourceHashesCache.bin b/.gradle/7.6/fileHashes/resourceHashesCache.bin
index ae3fd78..00d5396 100644
Binary files a/.gradle/7.6/fileHashes/resourceHashesCache.bin and b/.gradle/7.6/fileHashes/resourceHashesCache.bin differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index c9c43a4..69e4437 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe
index f373584..a3ba22b 100644
Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index e58d3e4..42250da 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,6 +1,14 @@
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index cdb1d4f..625bf39 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -6,6 +6,11 @@
+
+
+
+
+
@@ -16,20 +21,15 @@
-
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 1a227fb..55f530f 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/README.txt b/README.txt
index 918b621..9ffcf55 100644
--- a/README.txt
+++ b/README.txt
@@ -1,12 +1,18 @@
-Juego del bien público
-
+ Juego del bien público
+----------------------
- Varios jugadores.
-- Reciben monedas al comienzo.
-- Hay un bote central
-- Cada turno se elige con cuántas monedas uno colabora al bote
+- Reciben N monedas al comienzo.
+- Hay un bote central.
+
+- Cada turno se elige con cuántas monedas uno colabora al bote.
- Entonces, el contenido del bote se multiplica por dos y se divide entre todos los jugadores.
- Pasadas N rondas, el jugador se queda con lo que ganó + monedas iniciales.
+
Comprobar cómo de dispuesta está la gente a contribuir a un bien, que será compartido por todos por igual,
hayan contribuido o no.
+
+-Un Chat genera una sesión para cada jugador.
+-Cada chat tiene 2 o más participantes.
+-Los chats tienen varios jugadores y ahí se juegan turnos.
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 2af1428..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,25 +0,0 @@
-apply plugin: 'java'
-apply plugin: 'idea'
-apply plugin: 'application'
-
-
-repositories {
- mavenCentral()
- mavenLocal()
- maven {
- url "https://repo.akka.io/maven"
- }
-}
-
-dependencies {
- implementation 'com.typesafe.akka:akka-actor-typed_2.13:2.9.0'
- implementation 'ch.qos.logback:logback-classic:1.2.3'
- testImplementation 'com.typesafe.akka:akka-actor-testkit-typed_2.13:2.9.0'
- testImplementation 'junit:junit:4.13.1'
-}
-
-mainClassName = "com.example.AkkaQuickstart"
-
-run {
- standardInput = System.in
-}
diff --git a/build.sbt b/build.sbt
deleted file mode 100644
index 7826143..0000000
--- a/build.sbt
+++ /dev/null
@@ -1,24 +0,0 @@
-name := "akka-quickstart-java"
-
-version := "1.0"
-
-scalaVersion := "2.13.12"
-
-lazy val akkaVersion = "2.9.0"
-
-resolvers += "Akka library repository".at("https://repo.akka.io/maven")
-
-// Run in a separate JVM, to make sure sbt waits until all threads have
-// finished before returning.
-// If you want to keep the application running while executing other
-// sbt tasks, consider https://github.com/spray/sbt-revolver/
-fork := true
-
-resolvers += "Akka library repository".at("https://repo.akka.io/maven")
-
-libraryDependencies ++= Seq(
- "com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
- "com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion,
- "ch.qos.logback" % "logback-classic" % "1.2.3",
- "junit" % "junit" % "4.13.1" % Test,
- "com.novocode" % "junit-interface" % "0.11" % Test)
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatQuickStart$Main.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatQuickStart$Main.class
deleted file mode 100644
index c6fcb07..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatQuickStart$Main.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatQuickStart.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatQuickStart.class
deleted file mode 100644
index 0651672..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatQuickStart.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$GetSession.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$GetSession.class
deleted file mode 100644
index 2a37433..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$GetSession.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$MessagePosted.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$MessagePosted.class
deleted file mode 100644
index 5febfbb..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$MessagePosted.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$NotifyClient.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$NotifyClient.class
deleted file mode 100644
index 777ceb1..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$NotifyClient.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$PostMessage.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$PostMessage.class
deleted file mode 100644
index 4342948..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$PostMessage.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$PublishSessionMessage.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$PublishSessionMessage.class
deleted file mode 100644
index a474278..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$PublishSessionMessage.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$RoomCommand.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$RoomCommand.class
deleted file mode 100644
index 919c9a0..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$RoomCommand.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$Session.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$Session.class
deleted file mode 100644
index 605f13a..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$Session.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionCommand.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionCommand.class
deleted file mode 100644
index fe5bc26..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionCommand.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionDenied.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionDenied.class
deleted file mode 100644
index d1014c5..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionDenied.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionEvent.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionEvent.class
deleted file mode 100644
index 255b807..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionEvent.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionGranted.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionGranted.class
deleted file mode 100644
index c3838cd..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom$SessionGranted.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom.class b/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom.class
deleted file mode 100644
index b5457f1..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/ChatRoom.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/Gabbler.class b/build/classes/java/main/dev/freireservices/social_altruism/Gabbler.class
deleted file mode 100644
index 0f0ccd4..0000000
Binary files a/build/classes/java/main/dev/freireservices/social_altruism/Gabbler.class and /dev/null differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$EnterPot.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$EnterPot.class
new file mode 100644
index 0000000..aa3a7ea
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$EnterPot.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$MessagePosted.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$MessagePosted.class
new file mode 100644
index 0000000..60bd904
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$MessagePosted.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$ParticipateInTurn.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$ParticipateInTurn.class
new file mode 100644
index 0000000..a916d70
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$ParticipateInTurn.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$PotReturned.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$PotReturned.class
new file mode 100644
index 0000000..9d60871
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$PotReturned.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$RoomCommand.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$RoomCommand.class
new file mode 100644
index 0000000..87ae993
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$RoomCommand.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$Session.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$Session.class
new file mode 100644
index 0000000..90bda81
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$Session.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionCommand.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionCommand.class
new file mode 100644
index 0000000..66a9db4
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionCommand.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionDenied.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionDenied.class
new file mode 100644
index 0000000..c5e02a5
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionDenied.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionEvent.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionEvent.class
new file mode 100644
index 0000000..f11cd3d
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionEvent.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionGranted.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionGranted.class
new file mode 100644
index 0000000..68a83aa
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionGranted.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SharePotWithParticipants.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SharePotWithParticipants.class
new file mode 100644
index 0000000..0b4c4f1
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$SharePotWithParticipants.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$UpdatePlayerAfterTurn.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$UpdatePlayerAfterTurn.class
new file mode 100644
index 0000000..4e91866
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol$UpdatePlayerAfterTurn.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol.class
new file mode 100644
index 0000000..9653c31
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatPotProtocol.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatQuickStart$Main.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatQuickStart$Main.class
new file mode 100644
index 0000000..2b58b5c
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatQuickStart$Main.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatQuickStart.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatQuickStart.class
new file mode 100644
index 0000000..8a90af2
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/ChatQuickStart.class differ
diff --git a/build/classes/java/main/dev/freireservices/social_altruism/chat/Participante.class b/build/classes/java/main/dev/freireservices/social_altruism/chat/Participante.class
new file mode 100644
index 0000000..77ef008
Binary files /dev/null and b/build/classes/java/main/dev/freireservices/social_altruism/chat/Participante.class differ
diff --git a/build/classes/java/test/dev/freireservices/social_altruism/ChatQuickStartTest.class b/build/classes/java/test/dev/freireservices/social_altruism/ChatQuickStartTest.class
deleted file mode 100644
index 4e78a82..0000000
Binary files a/build/classes/java/test/dev/freireservices/social_altruism/ChatQuickStartTest.class and /dev/null differ
diff --git a/build/classes/java/test/dev/freireservices/social_altruism/chat/ChatQuickStartTest.class b/build/classes/java/test/dev/freireservices/social_altruism/chat/ChatQuickStartTest.class
new file mode 100644
index 0000000..8301a72
Binary files /dev/null and b/build/classes/java/test/dev/freireservices/social_altruism/chat/ChatQuickStartTest.class differ
diff --git a/build/reports/tests/test/classes/dev.freireservices.social_altruism.ChatQuickStartTest.html b/build/reports/tests/test/classes/dev.freireservices.social_altruism.ChatQuickStartTest.html
deleted file mode 100644
index fa1e4c8..0000000
--- a/build/reports/tests/test/classes/dev.freireservices.social_altruism.ChatQuickStartTest.html
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-Test results - Class dev.freireservices.social_altruism.ChatQuickStartTest
-
-
-
-
-
-
-
Class dev.freireservices.social_altruism.ChatQuickStartTest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Tests
-
-
-
-Test
-Duration
-Result
-
-
-
-testActorGetsUserDenied
-0.856s
-passed
-
-
-testGreeterActorSendingOfGreeting
-0.088s
-passed
-
-
-
-
-
Standard output
-
-[2023-12-22 09:02:23,397] [INFO] [akka.event.slf4j.Slf4jLogger] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [] - Slf4jLogger started
-[2023-12-22 09:02:23,552] [ERROR] [akka.actor.testkit.typed.internal.ActorTestKitGuardian$$anonfun$handleSpawnException$1] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user] - Spawn failed, props [EmptyProps]
-akka.actor.InvalidActorNameException: actor name [chatRoom] is not unique!
- at akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:134)
- at akka.actor.dungeon.Children.reserveChild(Children.scala:147)
- at akka.actor.dungeon.Children.reserveChild$(Children.scala:145)
- at akka.actor.ActorCell.reserveChild(ActorCell.scala:410)
- at akka.actor.dungeon.Children.makeChild(Children.scala:300)
- at akka.actor.dungeon.Children.actorOf(Children.scala:49)
- at akka.actor.dungeon.Children.actorOf$(Children.scala:48)
- at akka.actor.ActorCell.actorOf(ActorCell.scala:410)
- at akka.actor.typed.internal.adapter.ActorRefFactoryAdapter$.spawn(ActorRefFactoryAdapter.scala:55)
- at akka.actor.typed.internal.adapter.ActorContextAdapter.spawn(ActorContextAdapter.scala:73)
- at akka.actor.testkit.typed.internal.ActorTestKitGuardian$.$anonfun$testKitGuardian$1(TestKitUtils.scala:35)
- at akka.actor.typed.internal.BehaviorImpl$ReceiveBehavior.receive(BehaviorImpl.scala:136)
- at akka.actor.typed.Behavior$.interpret(Behavior.scala:282)
- at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:238)
- at akka.actor.typed.internal.InterceptorImpl$$anon$2.apply(InterceptorImpl.scala:57)
- at akka.actor.typed.internal.adapter.GuardianStopInterceptor.aroundReceive(GuardianStartupBehavior.scala:59)
- at akka.actor.typed.internal.InterceptorImpl.receive(InterceptorImpl.scala:85)
- at akka.actor.typed.Behavior$.interpret(Behavior.scala:282)
- at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:238)
- at akka.actor.typed.internal.adapter.ActorAdapter.handleMessage(ActorAdapter.scala:133)
- at akka.actor.typed.internal.adapter.ActorAdapter.aroundReceive(ActorAdapter.scala:109)
- at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579)
- at akka.actor.ActorCell.invoke(ActorCell.scala:547)
- at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
- at akka.dispatch.Mailbox.run(Mailbox.scala:231)
- at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
- at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
- at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
- at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1840)
- at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
- at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
-[2023-12-22 09:02:23,640] [INFO] [akka.actor.LocalActorRef] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user/$a] - Message [dev.freireservices.social_altruism.ChatRoom$GetSession] to Actor[akka://ChatQuickStartTest/user/$a#-835521502] was not delivered. [1] dead letters encountered. If this is not an expected behavior then Actor[akka://ChatQuickStartTest/user/$a#-835521502] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
-[2023-12-22 09:02:23,665] [INFO] [akka.actor.CoordinatedShutdown] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [CoordinatedShutdown(akka://ChatQuickStartTest)] - Running CoordinatedShutdown with reason [ActorSystemTerminateReason]
-
-
-
-
-
-
-
-
diff --git a/build/reports/tests/test/classes/dev.freireservices.social_altruism.chat.ChatQuickStartTest.html b/build/reports/tests/test/classes/dev.freireservices.social_altruism.chat.ChatQuickStartTest.html
new file mode 100644
index 0000000..5faed4a
--- /dev/null
+++ b/build/reports/tests/test/classes/dev.freireservices.social_altruism.chat.ChatQuickStartTest.html
@@ -0,0 +1,170 @@
+
+
+
+
+
+Test results - Class dev.freireservices.social_altruism.chat.ChatQuickStartTest
+
+
+
+
+
+
+
Class dev.freireservices.social_altruism.chat.ChatQuickStartTest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Failed tests
+
+
+
testGreeterActorSendingOfGreeting
+
+java.lang.AssertionError: Timeout (10 seconds) during expectMessageClass waiting for class dev.freireservices.social_altruism.chat.ChatPotProtocol$PotReturned
+ at akka.actor.testkit.typed.internal.TestProbeImpl.assertFail(TestProbeImpl.scala:399)
+ at akka.actor.testkit.typed.internal.TestProbeImpl.expectMessageClass_internal(TestProbeImpl.scala:239)
+ at akka.actor.testkit.typed.internal.TestProbeImpl.expectMessageClass(TestProbeImpl.scala:227)
+ at dev.freireservices.social_altruism.chat.ChatQuickStartTest.testGreeterActorSendingOfGreeting(ChatQuickStartTest.java:35)
+ at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:578)
+ at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
+ at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
+ at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
+ at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
+ at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
+ at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
+ at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
+ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
+ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
+ at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
+ at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
+ at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
+ at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
+ at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
+ at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
+ at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
+ at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:108)
+ at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:57)
+ at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:39)
+ at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
+ at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
+ at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:578)
+ at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
+ at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
+ at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
+ at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
+ at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
+ at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
+ at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
+ at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
+ at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
+ at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
+
+
+
+
+
+
Tests
+
+
+
+Test
+Duration
+Result
+
+
+
+testGreeterActorSendingOfGreeting
+10.961s
+failed
+
+
+
+
+
Standard output
+
+[2023-12-23 11:22:37,346] [INFO] [akka.event.slf4j.Slf4jLogger] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [] - Slf4jLogger started
+[2023-12-23 11:22:37,495] [INFO] [dev.freireservices.social_altruism.chat.ChatPotProtocol] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user/chatRoom] - Participant joined participanteUno turn pot: 10.0
+[2023-12-23 11:22:37,497] [INFO] [dev.freireservices.social_altruism.chat.ChatPotProtocol] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user/chatRoom] - Waiting for more participants.
+[2023-12-23 11:22:37,498] [INFO] [dev.freireservices.social_altruism.chat.ChatPotProtocol] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user/chatRoom] - Participant joined participanteDos turn pot: 1.0
+[2023-12-23 11:22:37,500] [INFO] [dev.freireservices.social_altruism.chat.ChatPotProtocol] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user/chatRoom] - All participants joined; beginning turn: 11.0
+[2023-12-23 11:22:37,500] [INFO] [dev.freireservices.social_altruism.chat.ChatPotProtocol] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user/chatRoom] - Starting pot: 11.0
+[2023-12-23 11:22:37,502] [INFO] [dev.freireservices.social_altruism.chat.Participante] [ChatQuickStartTest-akka.actor.default-dispatcher-5] [akka://ChatQuickStartTest/user/participanteUno] - Pot returned: 11.0
+[2023-12-23 11:22:37,502] [INFO] [dev.freireservices.social_altruism.chat.Participante] [ChatQuickStartTest-akka.actor.default-dispatcher-3] [akka://ChatQuickStartTest/user/participanteDos] - Pot returned: 11.0
+
+
+
+
+
+
+
+
diff --git a/build/reports/tests/test/index.html b/build/reports/tests/test/index.html
index 39cfb74..38f91d6 100644
--- a/build/reports/tests/test/index.html
+++ b/build/reports/tests/test/index.html
@@ -20,13 +20,13 @@
@@ -38,7 +38,7 @@
-
0.944s
+
10.961s
duration
@@ -47,8 +47,8 @@
-
@@ -58,13 +58,25 @@
-
Package dev.freireservices.social_altruism
+
Package dev.freireservices.social_altruism.chat
-
all > dev.freireservices.social_altruism
+
all > dev.freireservices.social_altruism.chat
@@ -22,13 +22,13 @@
@@ -40,7 +40,7 @@
-
0.944s
+
10.961s
duration
@@ -49,8 +49,8 @@
-
@@ -60,10 +60,22 @@
Generated by
-Gradle 7.6 at 22 dic 2023, 9:02:23
+Gradle 7.6 at 23 dic 2023, 11:22:47
diff --git a/build/reports/tests/test/packages/dev.freireservices.social_altruism.html b/build/reports/tests/test/packages/dev.freireservices.social_altruism.chat.html
similarity index 61%
rename from build/reports/tests/test/packages/dev.freireservices.social_altruism.html
rename to build/reports/tests/test/packages/dev.freireservices.social_altruism.chat.html
index ca1a291..06c7426 100644
--- a/build/reports/tests/test/packages/dev.freireservices.social_altruism.html
+++ b/build/reports/tests/test/packages/dev.freireservices.social_altruism.chat.html
@@ -3,16 +3,16 @@
-
Test results - Package dev.freireservices.social_altruism
+
Test results - Package dev.freireservices.social_altruism.chat
diff --git a/build/test-results/test/TEST-dev.freireservices.social_altruism.ChatQuickStartTest.xml b/build/test-results/test/TEST-dev.freireservices.social_altruism.ChatQuickStartTest.xml
deleted file mode 100644
index 39910e7..0000000
--- a/build/test-results/test/TEST-dev.freireservices.social_altruism.ChatQuickStartTest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/build/test-results/test/TEST-dev.freireservices.social_altruism.chat.ChatQuickStartTest.xml b/build/test-results/test/TEST-dev.freireservices.social_altruism.chat.ChatQuickStartTest.xml
new file mode 100644
index 0000000..cb3f4fe
--- /dev/null
+++ b/build/test-results/test/TEST-dev.freireservices.social_altruism.chat.ChatQuickStartTest.xml
@@ -0,0 +1,61 @@
+
+
+
+
+ java.lang.AssertionError: Timeout (10 seconds) during expectMessageClass waiting for class dev.freireservices.social_altruism.chat.ChatPotProtocol$PotReturned
+ at akka.actor.testkit.typed.internal.TestProbeImpl.assertFail(TestProbeImpl.scala:399)
+ at akka.actor.testkit.typed.internal.TestProbeImpl.expectMessageClass_internal(TestProbeImpl.scala:239)
+ at akka.actor.testkit.typed.internal.TestProbeImpl.expectMessageClass(TestProbeImpl.scala:227)
+ at dev.freireservices.social_altruism.chat.ChatQuickStartTest.testGreeterActorSendingOfGreeting(ChatQuickStartTest.java:35)
+ at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:578)
+ at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
+ at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
+ at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
+ at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
+ at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
+ at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
+ at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
+ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
+ at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
+ at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
+ at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
+ at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
+ at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
+ at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
+ at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
+ at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
+ at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:108)
+ at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:57)
+ at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:39)
+ at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
+ at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
+ at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+ at java.base/java.lang.reflect.Method.invoke(Method.java:578)
+ at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
+ at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
+ at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
+ at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
+ at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
+ at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
+ at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
+ at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
+ at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
+ at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
+ at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
+
+
+
+
+
diff --git a/build/test-results/test/binary/output.bin b/build/test-results/test/binary/output.bin
index e4ba414..3dbb6d6 100644
Binary files a/build/test-results/test/binary/output.bin and b/build/test-results/test/binary/output.bin differ
diff --git a/build/test-results/test/binary/output.bin.idx b/build/test-results/test/binary/output.bin.idx
index 480e221..392cbee 100644
Binary files a/build/test-results/test/binary/output.bin.idx and b/build/test-results/test/binary/output.bin.idx differ
diff --git a/build/test-results/test/binary/results.bin b/build/test-results/test/binary/results.bin
index 46f5c17..fa82891 100644
Binary files a/build/test-results/test/binary/results.bin and b/build/test-results/test/binary/results.bin differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart$Main.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart$Main.class.uniqueId0
new file mode 100644
index 0000000..2b58b5c
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart$Main.class.uniqueId0 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart$Main.class.uniqueId3 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart$Main.class.uniqueId3
deleted file mode 100644
index c6fcb07..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart$Main.class.uniqueId3 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart.class.uniqueId1
new file mode 100644
index 0000000..8a90af2
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart.class.uniqueId1 differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart.class.uniqueId5 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart.class.uniqueId5
deleted file mode 100644
index 0651672..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatQuickStart.class.uniqueId5 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$GetSession.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$GetSession.class.uniqueId1
deleted file mode 100644
index 2a37433..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$GetSession.class.uniqueId1 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$MessagePosted.class.uniqueId2 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$MessagePosted.class.uniqueId2
deleted file mode 100644
index def7f0e..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$MessagePosted.class.uniqueId2 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$NotifyClient.class.uniqueId11 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$NotifyClient.class.uniqueId11
deleted file mode 100644
index dcab200..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$NotifyClient.class.uniqueId11 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$PostMessage.class.uniqueId9 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$PostMessage.class.uniqueId9
deleted file mode 100644
index 2739d8c..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$PostMessage.class.uniqueId9 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$PublishSessionMessage.class.uniqueId4 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$PublishSessionMessage.class.uniqueId4
deleted file mode 100644
index a474278..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$PublishSessionMessage.class.uniqueId4 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$RoomCommand.class.uniqueId10 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$RoomCommand.class.uniqueId10
deleted file mode 100644
index 919c9a0..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$RoomCommand.class.uniqueId10 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$Session.class.uniqueId12 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$Session.class.uniqueId12
deleted file mode 100644
index 63ecff2..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$Session.class.uniqueId12 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionCommand.class.uniqueId13 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionCommand.class.uniqueId13
deleted file mode 100644
index fe5bc26..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionCommand.class.uniqueId13 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionDenied.class.uniqueId14 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionDenied.class.uniqueId14
deleted file mode 100644
index fde18cd..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionDenied.class.uniqueId14 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionEvent.class.uniqueId8 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionEvent.class.uniqueId8
deleted file mode 100644
index 255b807..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionEvent.class.uniqueId8 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionGranted.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionGranted.class.uniqueId0
deleted file mode 100644
index c3838cd..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom$SessionGranted.class.uniqueId0 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom.class.uniqueId6 b/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom.class.uniqueId6
deleted file mode 100644
index b5457f1..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ChatRoom.class.uniqueId6 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/Gabbler.class.uniqueId7 b/build/tmp/compileJava/compileTransaction/stash-dir/Gabbler.class.uniqueId7
deleted file mode 100644
index 0f0ccd4..0000000
Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/Gabbler.class.uniqueId7 and /dev/null differ
diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/Participante.class.uniqueId2 b/build/tmp/compileJava/compileTransaction/stash-dir/Participante.class.uniqueId2
new file mode 100644
index 0000000..06e4fd6
Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/Participante.class.uniqueId2 differ
diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin
index 437ae5b..76069a7 100644
Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ
diff --git a/build/tmp/compileTestJava/compileTransaction/stash-dir/ChatQuickStartTest.class.uniqueId0 b/build/tmp/compileTestJava/compileTransaction/stash-dir/ChatQuickStartTest.class.uniqueId0
deleted file mode 100644
index 72a8bcd..0000000
Binary files a/build/tmp/compileTestJava/compileTransaction/stash-dir/ChatQuickStartTest.class.uniqueId0 and /dev/null differ
diff --git a/build/tmp/compileTestJava/previous-compilation-data.bin b/build/tmp/compileTestJava/previous-compilation-data.bin
index 02c8f29..6adba76 100644
Binary files a/build/tmp/compileTestJava/previous-compilation-data.bin and b/build/tmp/compileTestJava/previous-compilation-data.bin differ
diff --git a/gradlew b/gradlew
deleted file mode 100644
index aeb74cb..0000000
--- a/gradlew
+++ /dev/null
@@ -1,245 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright © 2015-2021 the original authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-#
-# Gradle start up script for POSIX generated by Gradle.
-#
-# Important for running:
-#
-# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
-# noncompliant, but you have some other compliant shell such as ksh or
-# bash, then to run this script, type that shell name before the whole
-# command line, like:
-#
-# ksh Gradle
-#
-# Busybox and similar reduced shells will NOT work, because this script
-# requires all of these POSIX shell features:
-# * functions;
-# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
-# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
-# * compound commands having a testable exit status, especially «case»;
-# * various built-in commands including «command», «set», and «ulimit».
-#
-# Important for patching:
-#
-# (2) This script targets any POSIX shell, so it avoids extensions provided
-# by Bash, Ksh, etc; in particular arrays are avoided.
-#
-# The "traditional" practice of packing multiple parameters into a
-# space-separated string is a well documented source of bugs and security
-# problems, so this is (mostly) avoided, by progressively accumulating
-# options in "$@", and eventually passing that to Java.
-#
-# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
-# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
-# see the in-line comments for details.
-#
-# There are tweaks for specific operating systems such as AIX, CygWin,
-# Darwin, MinGW, and NonStop.
-#
-# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
-# within the Gradle project.
-#
-# You can find Gradle at https://github.com/gradle/gradle/.
-#
-##############################################################################
-
-# Attempt to set APP_HOME
-
-# Resolve links: $0 may be a link
-app_path=$0
-
-# Need this for daisy-chained symlinks.
-while
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
- [ -h "$app_path" ]
-do
- ls=$( ls -ld "$app_path" )
- link=${ls#*' -> '}
- case $link in #(
- /*) app_path=$link ;; #(
- *) app_path=$APP_HOME$link ;;
- esac
-done
-
-# This is normally unused
-# shellcheck disable=SC2034
-APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD=maximum
-
-warn () {
- echo "$*"
-} >&2
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-} >&2
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "$( uname )" in #(
- CYGWIN* ) cygwin=true ;; #(
- Darwin* ) darwin=true ;; #(
- MSYS* | MINGW* ) msys=true ;; #(
- NONSTOP* ) nonstop=true ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD=$JAVA_HOME/jre/sh/java
- else
- JAVACMD=$JAVA_HOME/bin/java
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
- case $MAX_FD in #(
- max*)
- # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
- MAX_FD=$( ulimit -H -n ) ||
- warn "Could not query maximum file descriptor limit"
- esac
- case $MAX_FD in #(
- '' | soft) :;; #(
- *)
- # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
- ulimit -n "$MAX_FD" ||
- warn "Could not set maximum file descriptor limit to $MAX_FD"
- esac
-fi
-
-# Collect all arguments for the java command, stacking in reverse order:
-# * args from the command line
-# * the main class name
-# * -classpath
-# * -D...appname settings
-# * --module-path (only if needed)
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if "$cygwin" || "$msys" ; then
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
-
- JAVACMD=$( cygpath --unix "$JAVACMD" )
-
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- for arg do
- if
- case $arg in #(
- -*) false ;; # don't mess with options #(
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
- [ -e "$t" ] ;; #(
- *) false ;;
- esac
- then
- arg=$( cygpath --path --ignore --mixed "$arg" )
- fi
- # Roll the args list around exactly as many times as the number of
- # args, so each arg winds up back in the position where it started, but
- # possibly modified.
- #
- # NB: a `for` loop captures its iteration list before it begins, so
- # changing the positional parameters here affects neither the number of
- # iterations, nor the values presented in `arg`.
- shift # remove old arg
- set -- "$@" "$arg" # push replacement arg
- done
-fi
-
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
-
-set -- \
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
- "$@"
-
-# Stop when "xargs" is not available.
-if ! command -v xargs >/dev/null 2>&1
-then
- die "xargs is not available"
-fi
-
-# Use "xargs" to parse quoted args.
-#
-# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
-#
-# In Bash we could simply go:
-#
-# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
-# set -- "${ARGS[@]}" "$@"
-#
-# but POSIX shell has neither arrays nor command substitution, so instead we
-# post-process each arg (as a line of input to sed) to backslash-escape any
-# character that might be a shell metacharacter, then use eval to reverse
-# that process (while maintaining the separation between arguments), and wrap
-# the whole thing up as a single "set" statement.
-#
-# This will of course break if any of these variables contains a newline or
-# an unmatched quote.
-#
-
-eval "set -- $(
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
- xargs -n1 |
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
- tr '\n' ' '
- )" '"$@"'
-
-exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index 6689b85..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,92 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%"=="" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%"=="" set DIRNAME=.
-@rem This is normally unused
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if %ERRORLEVEL% equ 0 goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if %ERRORLEVEL% equ 0 goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-set EXIT_CODE=%ERRORLEVEL%
-if %EXIT_CODE% equ 0 set EXIT_CODE=1
-if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
-exit /b %EXIT_CODE%
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/pom.xml b/pom.xml
index e51e716..210b44e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
hello-akka-java
- app
+ SocialAltruism
1.0
@@ -19,16 +19,20 @@
+
+
+
+ ch.qos.logback
+ logback-classic
+ 1.4.14
+
+
+
com.typesafe.akka
akka-actor-typed_2.13
${akka.version}
-
- ch.qos.logback
- logback-classic
- 1.2.11
-
com.typesafe.akka
akka-actor-testkit-typed_2.13
@@ -41,16 +45,38 @@
4.13.2
test
+
+
+ org.awaitility
+ awaitility
+ 4.2.0
+ test
+
+
+ org.awaitility
+ awaitility-proxy
+ 3.1.6
+ test
+
+
+
+
+ org.hamcrest
+ hamcrest
+ 2.2
+ test
+
+
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.1
+ 3.11.0
- 17
- 17
+ 19
+ 19
@@ -62,7 +88,7 @@
-classpath
- dev.freireservices.social_altruism.ChatQuickStart
+ dev.freireservices.social_altruism.chat.ChatQuickStart
diff --git a/sbt b/sbt
deleted file mode 100755
index efdfda6..0000000
--- a/sbt
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./sbt-dist/bin/sbt "$@"
\ No newline at end of file
diff --git a/sbt.bat b/sbt.bat
deleted file mode 100755
index d199a1c..0000000
--- a/sbt.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@REM SBT launcher script
-
-.\sbt-dist\bin\sbt.bat %*
diff --git a/src/main/java/dev/freireservices/social_altruism/ChatQuickStart.java b/src/main/java/dev/freireservices/social_altruism/ChatQuickStart.java
deleted file mode 100644
index be1d3ef..0000000
--- a/src/main/java/dev/freireservices/social_altruism/ChatQuickStart.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package dev.freireservices.social_altruism;
-
-import akka.actor.typed.ActorRef;
-import akka.actor.typed.ActorSystem;
-import akka.actor.typed.Behavior;
-import akka.actor.typed.Terminated;
-import akka.actor.typed.javadsl.Behaviors;
-
-public class ChatQuickStart {
- public static void main(String[] args) {
- // #actor-system
- ActorSystem.create(Main.create(), "ChatRoomDemo");
- }
-
- public static class Main {
- public static Behavior create() {
- return Behaviors.setup(
- context -> {
- ActorRef chatRoom = context.spawn(ChatRoom.create(), "chatRoom");
- ActorRef gabbler = context.spawn(Gabbler.create(), "gabbler");
- context.watch(gabbler);
- chatRoom.tell(new ChatRoom.GetSession("ol’ Gabbler", gabbler));
-
- return Behaviors.receive(Void.class)
- .onSignal(Terminated.class, sig -> Behaviors.stopped())
- .build();
- });
- }
- }
- // #actor-system
-}
diff --git a/src/main/java/dev/freireservices/social_altruism/ChatRoom.java b/src/main/java/dev/freireservices/social_altruism/ChatRoom.java
deleted file mode 100644
index 0e7d5e8..0000000
--- a/src/main/java/dev/freireservices/social_altruism/ChatRoom.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package dev.freireservices.social_altruism;
-
-import akka.actor.typed.ActorRef;
-import akka.actor.typed.Behavior;
-import akka.actor.typed.javadsl.ActorContext;
-import akka.actor.typed.javadsl.Behaviors;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-public class ChatRoom {
-
- private final ActorContext context;
-
- private ChatRoom(ActorContext context) {
- this.context = context;
- }
-
- interface RoomCommand {}
-
- public static final class GetSession implements RoomCommand {
- public final String screenName;
- public final ActorRef replyTo;
-
-
- public GetSession(String screenName, ActorRef replyTo) {
- this.screenName = screenName;
- this.replyTo = replyTo;
- }
- }
- // #chatroom-protocol
- // #chatroom-behavior
- private static final class PublishSessionMessage implements RoomCommand {
- public final String screenName;
- public final String message;
-
-
- public PublishSessionMessage(String screenName, String message) {
- this.screenName = screenName;
- this.message = message;
- }
- }
- // #chatroom-behavior
- // #chatroom-protocol
-
- private Behavior onGetSession(
- List> sessions, GetSession getSession) {
-
- if (sessions.stream().anyMatch(s -> s.path().name().equals(URLEncoder.encode(getSession.screenName, StandardCharsets.UTF_8)))) {
- getSession.replyTo.tell(new SessionDenied("duplicate session name"));
- return Behaviors.same();
- }
-
- ActorRef client = getSession.replyTo;
- ActorRef ses =
- context.spawn(
- Session.create(context.getSelf(), getSession.screenName, client),
- URLEncoder.encode(getSession.screenName, StandardCharsets.UTF_8));
- // narrow to only expose PostMessage
-
- client.tell(new SessionGranted(ses.narrow()));
-
- List> newSessions = new ArrayList<>(sessions);
- newSessions.add(ses);
- return chatRoom(newSessions);
- }
-
- private Behavior onPublishSessionMessage(
- List> sessions, PublishSessionMessage pub) {
- NotifyClient notification =
- new NotifyClient((new MessagePosted(pub.screenName, pub.message)));
- sessions.forEach(s -> s.tell(notification));
- return Behaviors.same();
- }
-
- private Behavior chatRoom(List> sessions) {
- return Behaviors.receive(RoomCommand.class)
- .onMessage(GetSession.class, getSession -> onGetSession(sessions, getSession))
- .onMessage(PublishSessionMessage.class, pub -> onPublishSessionMessage(sessions, pub))
- .build();
- }
-
-
- public static Behavior create() {
- return Behaviors.setup(
- ctx -> new ChatRoom(ctx).chatRoom(new ArrayList>()));
- }
-
- public interface SessionEvent {}
-
-
- public static final class SessionGranted implements SessionEvent {
- public final ActorRef handle;
-
-
- public SessionGranted(ActorRef handle) {
- this.handle = handle;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- SessionGranted that = (SessionGranted) o;
- return Objects.equals(handle, that.handle);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(handle);
- }
-
- @Override
- public String toString() {
- return "SessionGranted{" +
- "handle=" + handle +
- '}';
- }
- }
-
-
- public static final class SessionDenied implements SessionEvent {
- public final String reason;
-
-
- public SessionDenied(String reason) {
- this.reason = reason;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- SessionDenied that = (SessionDenied) o;
- return Objects.equals(reason, that.reason);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(reason);
- }
-
- @Override
- public String toString() {
- return "SessionDenied{" +
- "reason='" + reason + '\'' +
- '}';
- }
- }
-
-
- public static final class MessagePosted implements SessionEvent {
- public final String screenName;
- public final String message;
-
-
- public MessagePosted(String screenName, String message) {
- this.screenName = screenName;
- this.message = message;
- }
- }
-
-
- interface SessionCommand {}
-
-
- public static final class PostMessage implements SessionCommand {
- public final String message;
-
-
- public PostMessage(String message) {
- this.message = message;
- }
- }
-
-
- private static final class NotifyClient implements SessionCommand {
- final MessagePosted message;
-
-
- NotifyClient(MessagePosted message) {
- this.message = message;
- }
- }
-
- static class Session {
- static Behavior create(
- ActorRef room, String screenName, ActorRef client) {
- return Behaviors.receive(ChatRoom.SessionCommand.class)
- .onMessage(PostMessage.class, post -> onPostMessage(room, screenName, post))
- .onMessage(NotifyClient.class, notification -> onNotifyClient(client, notification))
- .build();
- }
-
- private static Behavior onPostMessage(
- ActorRef room, String screenName, PostMessage post) {
- // from client, publish to others via the room
- room.tell(new PublishSessionMessage(screenName, post.message));
- return Behaviors.same();
- }
-
- private static Behavior onNotifyClient(
- ActorRef client, NotifyClient notification) {
- // published from the room
- client.tell(notification.message);
- return Behaviors.same();
- }
- }
-}
diff --git a/src/main/java/dev/freireservices/social_altruism/Gabbler.java b/src/main/java/dev/freireservices/social_altruism/Gabbler.java
deleted file mode 100644
index 972e2ba..0000000
--- a/src/main/java/dev/freireservices/social_altruism/Gabbler.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package dev.freireservices.social_altruism;
-
-import akka.actor.typed.Behavior;
-import akka.actor.typed.javadsl.ActorContext;
-import akka.actor.typed.javadsl.Behaviors;
-import dev.freireservices.social_altruism.ChatRoom;
-
-public class Gabbler {
-
- public static Behavior create() {
- return Behaviors.setup(ctx -> new Gabbler(ctx).behavior());
- }
-
- private final ActorContext context;
-
- private Gabbler(ActorContext context) {
- this.context = context;
- }
-
- private Behavior behavior() {
- return Behaviors.receive(ChatRoom.SessionEvent.class)
- .onMessage(ChatRoom.SessionDenied.class, this::onSessionDenied)
- .onMessage(ChatRoom.SessionGranted.class, this::onSessionGranted)
- .onMessage(ChatRoom.MessagePosted.class, this::onMessagePosted)
- .build();
- }
-
- private Behavior onSessionDenied(ChatRoom.SessionDenied message) {
- context.getLog().info("cannot start chat room session: {}", message.reason);
- return Behaviors.stopped();
- }
-
- private Behavior onSessionGranted(ChatRoom.SessionGranted message) {
- message.handle.tell(new ChatRoom.PostMessage("Hello World!"));
- return Behaviors.same();
- }
-
- private Behavior onMessagePosted(ChatRoom.MessagePosted message) {
- context
- .getLog()
- .info("message has been posted by '{}': {}", message.screenName, message.message);
- return Behaviors.stopped();
- }
-}
\ No newline at end of file
diff --git a/src/main/java/dev/freireservices/social_altruism/chat/ChatPotProtocol.java b/src/main/java/dev/freireservices/social_altruism/chat/ChatPotProtocol.java
new file mode 100644
index 0000000..b94adf9
--- /dev/null
+++ b/src/main/java/dev/freireservices/social_altruism/chat/ChatPotProtocol.java
@@ -0,0 +1,154 @@
+package dev.freireservices.social_altruism.chat;
+
+import static java.nio.charset.StandardCharsets.*;
+import static java.util.Collections.emptyList;
+
+import akka.actor.typed.ActorRef;
+import akka.actor.typed.Behavior;
+import akka.actor.typed.javadsl.ActorContext;
+import akka.actor.typed.javadsl.Behaviors;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChatPotProtocol {
+ private final ActorContext context;
+
+ public double getCurrentPot() {
+ return currentPot;
+ }
+
+ public void setCurrentPot(double currentPot) {
+ this.currentPot = currentPot;
+ }
+
+ public void addToPot(double pot) {
+ this.currentPot += pot;
+ }
+
+ private double currentPot = 0.0;
+ private int currentTurn = 0;
+ private final int numberOfParticipants;
+
+ private ChatPotProtocol(ActorContext context, int numberOfParticipants) {
+ this.numberOfParticipants = numberOfParticipants;
+ this.context = context;
+ }
+
+ interface RoomCommand {}
+
+ public record EnterPot(ActorRef replyTo, double pot) implements RoomCommand {}
+
+ // #chatroom-protocol
+ // #chatroom-behavior
+ private record UpdatePlayerAfterTurn(String screenName, String message) implements RoomCommand {}
+
+ // #chatroom-behavior
+ // #chatroom-protocol
+
+ private Behavior onGetPotSession(
+ EnterPot enterPot, List> sessions) {
+
+ //Add check session started
+
+ if (sessions.stream()
+ .anyMatch(
+ s ->
+ s.path().name().equals(URLEncoder.encode(enterPot.replyTo.path().name(), UTF_8)))) {
+
+ enterPot.replyTo.tell(new SessionDenied("Can only enter a pot once"));
+ }
+
+ context
+ .getLog()
+ .info("Participant joined {} turn pot: {}", enterPot.replyTo.path().name(), enterPot.pot);
+
+ // Add to current pot
+ addToPot(enterPot.pot);
+
+ ActorRef client = enterPot.replyTo;
+
+ ActorRef ses =
+ context.spawn(
+ Session.create(client), URLEncoder.encode(enterPot.replyTo.path().name(), UTF_8));
+
+ // narrow to only expose PostMessage
+ client.tell(new SessionGranted(ses.narrow()));
+
+ List> newSessions = new ArrayList<>(sessions);
+
+ newSessions.add(ses);
+
+ if (numberOfParticipants == newSessions.size()) {
+ // Begin
+ context.getLog().info("All participants joined; beginning turn: " + getCurrentPot());
+
+ double amountToShare = (getCurrentPot() * 2) / numberOfParticipants;
+
+ context.getLog().info("Starting pot: " + getCurrentPot());
+
+ newSessions.forEach(s -> s.tell(new SharePotWithParticipants(amountToShare)));
+
+ currentTurn++;
+ return Behaviors.same();
+
+ } else {
+ // Waiting for more participants
+ context.getLog().info("Waiting for more participants.");
+
+ return createPot(newSessions);
+ }
+ }
+
+ private Behavior onUpdatePlayerAfterTurn(
+ List> sessions, UpdatePlayerAfterTurn pub) {
+ // NotifyClient notification = new NotifyClient((new MessagePosted(pub.screenName,
+ // pub.message)));
+
+ return Behaviors.same();
+ }
+
+ private Behavior createPot(List> sessions) {
+ return Behaviors.receive(RoomCommand.class)
+ .onMessage(EnterPot.class, enterPot -> onGetPotSession(enterPot, sessions))
+ //
+ .onMessage(UpdatePlayerAfterTurn.class, pub -> onUpdatePlayerAfterTurn(sessions, pub))
+ .build();
+ }
+
+ public static Behavior create(int numberOfParticipants) {
+ return Behaviors.setup(ctx -> new ChatPotProtocol(ctx, numberOfParticipants).createPot(emptyList()));
+ }
+
+ public interface SessionEvent {}
+
+ public record SessionGranted(ActorRef handle) implements SessionEvent {}
+
+ public record SessionDenied(String reason) implements SessionEvent {}
+
+ public record MessagePosted(String screenName, String message) implements SessionEvent {}
+
+ public record PotReturned(double returnedAmount) implements SessionEvent {}
+
+ interface SessionCommand {}
+
+ public record ParticipateInTurn(String message) implements SessionCommand {}
+
+ public record SharePotWithParticipants(double returnedAmount) implements SessionCommand {}
+
+ static class Session {
+ static Behavior create(ActorRef client) {
+ return Behaviors.receive(ChatPotProtocol.SessionCommand.class)
+ .onMessage(
+ SharePotWithParticipants.class,
+ pot -> onSharePotWithParticipants(client, pot.returnedAmount))
+ .build();
+ }
+
+ private static Behavior onSharePotWithParticipants(
+ ActorRef client, double returnedAmount) {
+ client.tell(new ChatPotProtocol.PotReturned(returnedAmount));
+ return Behaviors.same();
+ }
+ }
+}
diff --git a/src/main/java/dev/freireservices/social_altruism/chat/ChatQuickStart.java b/src/main/java/dev/freireservices/social_altruism/chat/ChatQuickStart.java
new file mode 100644
index 0000000..3291354
--- /dev/null
+++ b/src/main/java/dev/freireservices/social_altruism/chat/ChatQuickStart.java
@@ -0,0 +1,55 @@
+package dev.freireservices.social_altruism.chat;
+
+import akka.actor.typed.ActorRef;
+import akka.actor.typed.ActorSystem;
+import akka.actor.typed.Behavior;
+import akka.actor.typed.Terminated;
+import akka.actor.typed.javadsl.Behaviors;
+import java.security.SecureRandom;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.IntStream;
+
+public class ChatQuickStart {
+
+ public static void main(String[] args) {
+ // #actor-system
+ ActorSystem.create(Main.create(), "PotRoom");
+ }
+
+ public static class Main {
+
+ static List> sessions = new ArrayList<>();
+
+ public static Behavior create() {
+ return Behaviors.setup(
+ context -> {
+ ActorRef chatRoom = context.spawn(ChatPotProtocol.create(100), "potRoom");
+
+ // Agregamos jugadores
+ sessions.addAll(
+ IntStream.range(0, 100)
+ .mapToObj(
+ i ->
+ context.spawn(
+ Participante.create(getRandomNumberBetween(0, 100)), "participante-" + i))
+ .toList());
+
+ sessions.forEach(s -> chatRoom.tell(new ChatPotProtocol.EnterPot(s, getRandomNumberBetween(0, 100))));
+
+
+
+ return Behaviors.receive(Void.class)
+ .onSignal(Terminated.class, sig -> Behaviors.stopped())
+ .build();
+ });
+ }
+ }
+
+ // #actor-system
+
+ public static int getRandomNumberBetween(int min, int max) {
+ SecureRandom secureRandom = new SecureRandom();
+ return secureRandom.nextInt(max - min) + min;
+ }
+}
diff --git a/src/main/java/dev/freireservices/social_altruism/chat/Participante.java b/src/main/java/dev/freireservices/social_altruism/chat/Participante.java
new file mode 100644
index 0000000..1925f6c
--- /dev/null
+++ b/src/main/java/dev/freireservices/social_altruism/chat/Participante.java
@@ -0,0 +1,72 @@
+package dev.freireservices.social_altruism.chat;
+
+import akka.actor.typed.Behavior;
+import akka.actor.typed.javadsl.ActorContext;
+import akka.actor.typed.javadsl.Behaviors;
+
+public class Participante {
+
+ public static Behavior create(int monedasInit) {
+ return Behaviors.setup(ctx -> new Participante(ctx, monedasInit).behavior());
+ }
+
+ private final ActorContext context;
+
+ public double getMonedas() {
+ return monedas;
+ }
+
+ public void setMonedas(double monedas) {
+ this.monedas = monedas;
+ }
+
+ public void decrementMonedas(double monedas) {
+ this.monedas -= monedas;
+ }
+
+ public void incrementMonedas(double monedas) {
+ this.monedas += monedas;
+ }
+
+ private double monedas;
+
+ private Participante(ActorContext context, double monedas) {
+ this.context = context;
+ this.monedas = monedas;
+ }
+
+ private Behavior behavior() {
+ return Behaviors.receive(ChatPotProtocol.SessionEvent.class)
+ .onMessage(ChatPotProtocol.SessionDenied.class, this::onSessionDenied)
+ .onMessage(ChatPotProtocol.SessionGranted.class, this::onSessionGranted)
+ .onMessage(ChatPotProtocol.MessagePosted.class, this::onMessagePosted)
+ .onMessage(ChatPotProtocol.PotReturned.class, this::onPotReturned)
+ .build();
+ }
+
+ private Behavior onSessionDenied(
+ ChatPotProtocol.SessionDenied message) {
+ context.getLog().info("cannot start chat room session: {}", message.reason());
+ return Behaviors.stopped();
+ }
+
+ private Behavior onSessionGranted(
+ ChatPotProtocol.SessionGranted message) {
+ return Behaviors.same();
+ }
+
+ private Behavior onMessagePosted(
+ ChatPotProtocol.MessagePosted message) {
+ context
+ .getLog()
+ .info("message has been posted by '{}': {}", message.screenName(), message.message());
+ return Behaviors.same();
+ }
+
+ private Behavior onPotReturned(
+ ChatPotProtocol.PotReturned potReturned) {
+ context.getLog().info("Pot returned: {}", potReturned.returnedAmount());
+ incrementMonedas(potReturned.returnedAmount());
+ return Behaviors.same();
+ }
+}
diff --git a/src/test/java/dev/freireservices/social_altruism/ChatQuickStartTest.java b/src/test/java/dev/freireservices/social_altruism/ChatQuickStartTest.java
deleted file mode 100644
index 63bbc6b..0000000
--- a/src/test/java/dev/freireservices/social_altruism/ChatQuickStartTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package dev.freireservices.social_altruism;
-
-import akka.actor.testkit.typed.javadsl.ActorTestKit;
-import akka.actor.testkit.typed.javadsl.TestProbe;
-import akka.actor.typed.ActorRef;
-import java.time.Duration;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-// #definition
-public class ChatQuickStartTest {
-
- static final ActorTestKit testKit = ActorTestKit.create();
-
- // #definition
-
- // #test
- @Test
- public void testGreeterActorSendingOfGreeting() {
-
- TestProbe testProbe = testKit.createTestProbe();
-
- ActorRef chatRoomTest = testKit.spawn(ChatRoom.create(), "chatRoom");
- ActorRef gabblerTest = testKit.spawn(Gabbler.create(), "gabbler");
-
- chatRoomTest.tell(new ChatRoom.GetSession("ol’ Gabbler", gabblerTest));
-
- ChatRoom.SessionGranted sessionGranted = new ChatRoom.SessionGranted(testProbe.ref());
- gabblerTest.tell(sessionGranted);
-
- ChatRoom.PostMessage postMessage = new ChatRoom.PostMessage("Hello World!");
- sessionGranted.handle.tell(postMessage);
- // #test
-
- // #assert
- testProbe.expectMessage(postMessage);
- // #assert
-
- testKit.stop(chatRoomTest);
- testKit.stop(gabblerTest);
- }
-
- @Test
- public void testActorGetsUserDenied() {
-
- TestProbe testProbe = testKit.createTestProbe();
-
- ActorRef chatRoomTest = testKit.spawn(ChatRoom.create(), "chatRoom");
-
- chatRoomTest.tell(new ChatRoom.GetSession("ol’ Gabbler", testProbe.ref()));
-
- testProbe.expectMessageClass(ChatRoom.SessionGranted.class, Duration.ofSeconds(10));
-
- chatRoomTest.tell(new ChatRoom.GetSession("ol’ Gabbler", testProbe.ref()));
-
- ChatRoom.SessionDenied sessionDenied = new ChatRoom.SessionDenied("duplicate session name");
-
- testProbe.expectMessage(Duration.ofSeconds(10), sessionDenied);
-
- // #assert
- }
-
- @AfterClass
- public static void cleanup() {
- testKit.system().terminate();
- testKit.shutdownTestKit();
- }
-}
diff --git a/src/test/java/dev/freireservices/social_altruism/chat/ChatQuickStartTest.java b/src/test/java/dev/freireservices/social_altruism/chat/ChatQuickStartTest.java
new file mode 100644
index 0000000..8174893
--- /dev/null
+++ b/src/test/java/dev/freireservices/social_altruism/chat/ChatQuickStartTest.java
@@ -0,0 +1,72 @@
+package dev.freireservices.social_altruism.chat;
+
+import akka.actor.testkit.typed.javadsl.ActorTestKit;
+import akka.actor.testkit.typed.javadsl.TestProbe;
+import akka.actor.typed.ActorRef;
+import java.time.Duration;
+import org.junit.Test;
+
+// #definition
+public class ChatQuickStartTest {
+
+ // #definition
+
+ // #test
+ @Test
+ public void testCooperationCaseOne() {
+
+ final ActorTestKit testKit = ActorTestKit.create();
+
+ TestProbe testProbe = testKit.createTestProbe();
+
+ ActorRef chatRoomTest =
+ testKit.spawn(ChatPotProtocol.create(2), "chatRoom");
+
+ ActorRef participanteUno =
+ testKit.spawn(Participante.create(100), "participanteUno");
+
+ ActorRef participanteDos =
+ testKit.spawn(Participante.create(10), "participanteDos");
+
+ ActorRef participanteTres =
+ testKit.spawn(Participante.create(100), "participanteTres");
+
+ ActorRef participanteCuatro =
+ testKit.spawn(Participante.create(10), "participanteCuatro");
+
+
+ // Turnos
+
+ chatRoomTest.tell(new ChatPotProtocol.EnterPot(participanteUno, 10));
+ chatRoomTest.tell(new ChatPotProtocol.EnterPot(participanteDos, 1));
+
+ chatRoomTest.tell(new ChatPotProtocol.EnterPot(participanteTres, 11));
+ chatRoomTest.tell(new ChatPotProtocol.EnterPot(participanteCuatro, 2));
+
+ // #assert
+ // #assert
+
+ }
+
+ @Test
+ public void testActorGetsUserDenied() {
+ final ActorTestKit testKit = ActorTestKit.create();
+ TestProbe testProbe = testKit.createTestProbe();
+
+ ActorRef chatRoomTest =
+ testKit.spawn(ChatPotProtocol.create(2), "chatRoom");
+
+ chatRoomTest.tell(new ChatPotProtocol.EnterPot(testProbe.ref(), 10));
+
+ testProbe.expectMessageClass(ChatPotProtocol.SessionGranted.class, Duration.ofSeconds(10));
+
+ chatRoomTest.tell(new ChatPotProtocol.EnterPot(testProbe.ref(), 10));
+
+ ChatPotProtocol.SessionDenied sessionDenied =
+ new ChatPotProtocol.SessionDenied("Can only enter a pot once");
+
+ testProbe.expectMessage(Duration.ofSeconds(10), sessionDenied);
+
+ // #assert
+ }
+}
diff --git a/target/classes/com/example/AkkaQuickstart.class b/target/classes/com/example/AkkaQuickstart.class
deleted file mode 100644
index 164722a..0000000
Binary files a/target/classes/com/example/AkkaQuickstart.class and /dev/null differ
diff --git a/target/classes/com/example/Greeter$Greet.class b/target/classes/com/example/Greeter$Greet.class
deleted file mode 100644
index e98192a..0000000
Binary files a/target/classes/com/example/Greeter$Greet.class and /dev/null differ
diff --git a/target/classes/com/example/Greeter$Greeted.class b/target/classes/com/example/Greeter$Greeted.class
deleted file mode 100644
index 0df9671..0000000
Binary files a/target/classes/com/example/Greeter$Greeted.class and /dev/null differ
diff --git a/target/classes/com/example/Greeter.class b/target/classes/com/example/Greeter.class
deleted file mode 100644
index 31a9593..0000000
Binary files a/target/classes/com/example/Greeter.class and /dev/null differ
diff --git a/target/classes/com/example/GreeterBot.class b/target/classes/com/example/GreeterBot.class
deleted file mode 100644
index 67c4e29..0000000
Binary files a/target/classes/com/example/GreeterBot.class and /dev/null differ
diff --git a/target/classes/com/example/GreeterMain$SayHello.class b/target/classes/com/example/GreeterMain$SayHello.class
deleted file mode 100644
index 7539d97..0000000
Binary files a/target/classes/com/example/GreeterMain$SayHello.class and /dev/null differ
diff --git a/target/classes/com/example/GreeterMain.class b/target/classes/com/example/GreeterMain.class
deleted file mode 100644
index 1fe021c..0000000
Binary files a/target/classes/com/example/GreeterMain.class and /dev/null differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$EnterPot.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$EnterPot.class
new file mode 100644
index 0000000..aa3a7ea
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$EnterPot.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$MessagePosted.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$MessagePosted.class
new file mode 100644
index 0000000..15c4f64
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$MessagePosted.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$ParticipateInTurn.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$ParticipateInTurn.class
new file mode 100644
index 0000000..fdd2865
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$ParticipateInTurn.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$PotReturned.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$PotReturned.class
new file mode 100644
index 0000000..aa05874
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$PotReturned.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$RoomCommand.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$RoomCommand.class
new file mode 100644
index 0000000..87ae993
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$RoomCommand.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$Session.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$Session.class
new file mode 100644
index 0000000..3534aff
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$Session.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionCommand.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionCommand.class
new file mode 100644
index 0000000..66a9db4
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionCommand.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionDenied.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionDenied.class
new file mode 100644
index 0000000..7003493
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionDenied.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionEvent.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionEvent.class
new file mode 100644
index 0000000..f11cd3d
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionEvent.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionGranted.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionGranted.class
new file mode 100644
index 0000000..cdec854
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionGranted.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SharePotWithParticipants.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SharePotWithParticipants.class
new file mode 100644
index 0000000..096eae6
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$SharePotWithParticipants.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$UpdatePlayerAfterTurn.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$UpdatePlayerAfterTurn.class
new file mode 100644
index 0000000..4e91866
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol$UpdatePlayerAfterTurn.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol.class b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol.class
new file mode 100644
index 0000000..0ee8630
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatPotProtocol.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatQuickStart$Main.class b/target/classes/dev/freireservices/social_altruism/chat/ChatQuickStart$Main.class
new file mode 100644
index 0000000..f68390b
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatQuickStart$Main.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/ChatQuickStart.class b/target/classes/dev/freireservices/social_altruism/chat/ChatQuickStart.class
new file mode 100644
index 0000000..8be709a
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/ChatQuickStart.class differ
diff --git a/target/classes/dev/freireservices/social_altruism/chat/Participante.class b/target/classes/dev/freireservices/social_altruism/chat/Participante.class
new file mode 100644
index 0000000..e75cae5
Binary files /dev/null and b/target/classes/dev/freireservices/social_altruism/chat/Participante.class differ
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
index 37c6d50..3a2e51c 100644
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -1,7 +1,16 @@
-com/example/Greeter$Greet.class
-com/example/AkkaQuickstart.class
-com/example/Greeter$Greeted.class
-com/example/GreeterMain$SayHello.class
-com/example/Greeter.class
-com/example/GreeterMain.class
-com/example/GreeterBot.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$PotReturned.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$Session.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$EnterPot.class
+dev/freireservices/social_altruism/chat/ChatQuickStart.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionGranted.class
+dev/freireservices/social_altruism/chat/ChatQuickStart$Main.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$SharePotWithParticipants.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$MessagePosted.class
+dev/freireservices/social_altruism/chat/Participante.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionEvent.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionCommand.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$ParticipateInTurn.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$UpdatePlayerAfterTurn.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$RoomCommand.class
+dev/freireservices/social_altruism/chat/ChatPotProtocol$SessionDenied.class
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
index 5debb49..b7effec 100644
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -1,4 +1,3 @@
-/Users/rdev/Source/social_altruism_akka/src/main/java/com/example/GreeterBot.java
-/Users/rdev/Source/social_altruism_akka/src/main/java/com/example/AkkaQuickstart.java
-/Users/rdev/Source/social_altruism_akka/src/main/java/com/example/Greeter.java
-/Users/rdev/Source/social_altruism_akka/src/main/java/com/example/GreeterMain.java
+/Users/rdev/Source/social_altruism_akka/src/main/java/dev/freireservices/social_altruism/chat/ChatQuickStart.java
+/Users/rdev/Source/social_altruism_akka/src/main/java/dev/freireservices/social_altruism/chat/ChatPotProtocol.java
+/Users/rdev/Source/social_altruism_akka/src/main/java/dev/freireservices/social_altruism/chat/Participante.java
diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
index 5a25cb3..0f63274 100644
--- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
+++ b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
@@ -1 +1 @@
-com/example/AkkaQuickstartTest.class
+dev/freireservices/social_altruism/chat/ChatQuickStartTest.class
diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
index 3406626..62f7eca 100644
--- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
+++ b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
@@ -1 +1 @@
-/Users/rdev/Source/social_altruism_akka/src/test/java/com/example/AkkaQuickstartTest.java
+/Users/rdev/Source/social_altruism_akka/src/test/java/dev/freireservices/social_altruism/chat/ChatQuickStartTest.java
diff --git a/target/surefire-reports/TEST-com.example.AkkaQuickstartTest.xml b/target/surefire-reports/TEST-com.example.AkkaQuickstartTest.xml
index 961ac4d..11eeca3 100644
--- a/target/surefire-reports/TEST-com.example.AkkaQuickstartTest.xml
+++ b/target/surefire-reports/TEST-com.example.AkkaQuickstartTest.xml
@@ -1,5 +1,5 @@
-
+
@@ -59,7 +59,7 @@
-
+
diff --git a/target/surefire-reports/TEST-dev.freireservices.social_altruism.chat.ChatQuickStartTest.xml b/target/surefire-reports/TEST-dev.freireservices.social_altruism.chat.ChatQuickStartTest.xml
new file mode 100644
index 0000000..c75837c
--- /dev/null
+++ b/target/surefire-reports/TEST-dev.freireservices.social_altruism.chat.ChatQuickStartTest.xml
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/surefire-reports/com.example.AkkaQuickstartTest.txt b/target/surefire-reports/com.example.AkkaQuickstartTest.txt
index 3bb9513..61c871e 100644
--- a/target/surefire-reports/com.example.AkkaQuickstartTest.txt
+++ b/target/surefire-reports/com.example.AkkaQuickstartTest.txt
@@ -1,4 +1,4 @@
-------------------------------------------------------------------------------
-Test set: dev.freireservices.social_altruism.ChatQuickStartTest
+Test set: dev.freireservices.social_altruism.chat.ChatQuickStartTest
-------------------------------------------------------------------------------
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.387 s -- in dev.freireservices.social_altruism.ChatQuickStartTest
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.387 s -- in dev.freireservices.social_altruism.chat.ChatQuickStartTest
diff --git a/target/surefire-reports/dev.freireservices.social_altruism.chat.ChatQuickStartTest.txt b/target/surefire-reports/dev.freireservices.social_altruism.chat.ChatQuickStartTest.txt
new file mode 100644
index 0000000..3a81013
--- /dev/null
+++ b/target/surefire-reports/dev.freireservices.social_altruism.chat.ChatQuickStartTest.txt
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------------------
+Test set: dev.freireservices.social_altruism.chat.ChatQuickStartTest
+-------------------------------------------------------------------------------
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.155 s -- in dev.freireservices.social_altruism.chat.ChatQuickStartTest
diff --git a/target/test-classes/com/example/AkkaQuickstartTest.class b/target/test-classes/com/example/AkkaQuickstartTest.class
deleted file mode 100644
index ea6320c..0000000
Binary files a/target/test-classes/com/example/AkkaQuickstartTest.class and /dev/null differ
diff --git a/target/test-classes/dev/freireservices/social_altruism/chat/ChatQuickStartTest.class b/target/test-classes/dev/freireservices/social_altruism/chat/ChatQuickStartTest.class
new file mode 100644
index 0000000..e73dabf
Binary files /dev/null and b/target/test-classes/dev/freireservices/social_altruism/chat/ChatQuickStartTest.class differ