From 7c249dd5e45407a9fc8abf814533fd0d4d526582 Mon Sep 17 00:00:00 2001 From: olhag Date: Sun, 19 May 2024 19:53:49 +0200 Subject: [PATCH] Doc DONE --- .../7.1/executionHistory/executionHistory.bin | Bin 88271 -> 88271 bytes .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/7.1/fileHashes/fileHashes.bin | Bin 24247 -> 24247 bytes .gradle/7.1/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .gradle/checksums/checksums.lock | Bin 17 -> 17 bytes .../example/AddressBook$CustomerMessage.class | Bin 1260 -> 1260 bytes .../example/AddressBook$GetCustomers.class | Bin 933 -> 933 bytes .../java/main/com/example/AddressBook.class | Bin 6818 -> 6816 bytes .../com/example/AkkaMainSystem$Create.class | Bin 396 -> 396 bytes .../main/com/example/AkkaMainSystem.class | Bin 5176 -> 5188 bytes .../java/main/com/example/AkkaStart.class | Bin 1404 -> 1404 bytes .../com/example/Customer$AddressHello.class | Bin 1934 -> 1934 bytes .../com/example/Customer$AddressMessage.class | Bin 2349 -> 2349 bytes .../example/Customer$DeliveryMessage.class | Bin 549 -> 549 bytes .../com/example/Customer$PickUpMessage.class | Bin 953 -> 953 bytes .../java/main/com/example/Customer.class | Bin 8436 -> 8436 bytes .../com/example/DeliveryCar$CheckStop.class | Bin 1344 -> 1344 bytes .../com/example/DeliveryCar$LoadMessage.class | Bin 1772 -> 1772 bytes .../example/DeliveryCar$PickupResponse.class | Bin 1586 -> 1586 bytes .../com/example/DeliveryCar$StartRoute.class | Bin 1350 -> 1350 bytes .../java/main/com/example/DeliveryCar.class | Bin 11576 -> 11576 bytes .../DistributionCenter$ArriveMessage.class | Bin 1386 -> 1386 bytes .../DistributionCenter$GenerateRoutes.class | Bin 1083 -> 1083 bytes .../DistributionCenter$StartAllRoutes.class | Bin 500 -> 500 bytes .../main/com/example/DistributionCenter.class | Bin 11443 -> 11443 bytes .../classes/java/main/com/example/Paket.class | Bin 993 -> 993 bytes .../compileJava/previous-compilation-data.bin | Bin 20858 -> 20858 bytes src/main/java/com/example/AddressBook.java | 56 ++++++++-- src/main/java/com/example/AkkaMainSystem.java | 44 ++++++-- src/main/java/com/example/Customer.java | 62 +++++++++-- src/main/java/com/example/DeliveryCar.java | 99 ++++++++++++++++-- .../java/com/example/DistributionCenter.java | 62 ++++++++++- src/main/java/com/example/Paket.java | 26 ++++- 34 files changed, 304 insertions(+), 45 deletions(-) diff --git a/.gradle/7.1/executionHistory/executionHistory.bin b/.gradle/7.1/executionHistory/executionHistory.bin index d9218ff039a1a71843e36dc96142ca1f45fdead4..384ade84c2323a2e8f1ebb21b1e2b4624c22acc1 100644 GIT binary patch delta 1158 zcmXw$do-J89LGINUbmt_GSbz|y+%W5qpI|XX5Bd~C}XOpYe*_mBocA&skjbP&R+AP zm`j!8^dik1%`)AonjqAz+Fhh#&gikj8Hyurd*Afz`RjXrpYQMY{GRVKE``RWPlaVOMW~ZbiiFujni3wg}aU3gI@BML?HHE-H#)$z3OL7>pyqsh+nAXcAc$?*v z&Z*ZE)GjhxE&k)e8Z(eWFoMU4S-+K&-Fp~)r=}9QurxM_Kw&CpmAnBdDW~U8W7k`T z@a-qp3HbwKipwm|(C)B~Vb!ebqNd@&f-{&Ygap7hP_ zaclfx7@Mt0|Hw+s1fTaC2-S#1|HbV#eN8(?r~~lC7LlYXFFn>871*k-IAKS+NEnu@ zu&%HB>`4c|@<)meCxes?E7UEkg7_uf8lKyZBo^)sXFWOsO5KI%aVyeS|LDkgpA)gj zbqePZea&M_nQl{7wYjW839?276iAJEka;3-2#~5)?VL7R(q+G9 zDSZch60#o-Y>E4O-sI7}4}RQ>@4PVFXlizV5zkA&iBw(N=!$c;d>6q@Pf!F2dseX+ zkX#ZP@v=@zNx+4e@#O~7-#V^rumX712B>4!vHm|U0Y~B&{q^*7%B1}lLs!Byz6|mf zMkc)hnW$i1$(&N%7nkvZj#Tf^1HTzT$@vICAsXYRH!C3fs!x5A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egVv+PcPFSJxN~Hk^fc!c|}Kks`k5%YHsu7uR5B1y@dQzN8a1( sbKcev?Oz$Yg1WTh)0}YpZ>g&d&Ex$Eo&%~>RClra%j&Q0Zih+u2M75~Jpcdz diff --git a/.gradle/7.1/executionHistory/executionHistory.lock b/.gradle/7.1/executionHistory/executionHistory.lock index c98cdd428d7f30f00e031982775b0ae9ab17097b..97d08d95affad4b3033bbbaa6da574e1faac6800 100644 GIT binary patch literal 17 VcmZQJ-Ffa%$-@Ly1~6a}2LLzB1a$xa literal 17 VcmZQJ-Ffa%$-@Ly1~6a}001||1a1HT diff --git a/.gradle/7.1/fileHashes/fileHashes.bin b/.gradle/7.1/fileHashes/fileHashes.bin index e472d9ed966628069659b93bbbe6a35947e8d01b..5294f02810e829df1e280b16ab469bc3a3bd05c8 100644 GIT binary patch delta 1270 zcmdnKmvQ@E#tmydgE%Lj7pc6_Evd8Bb+5^#%nSww#{P+4`u{P20XH9z(lZ7Unn0`w z!UB4J$L}1^I7j<-^ifs#PLw0QD=&oYTN!Drr+f9=wEkaE$oW~=sG zu%bUH^C$OuNqOD%WAr%0UUYZ5&>{Eli`gDPC6|H?U=VQu(r9*`?(URY6y~_-Zm))- zsJp;Ph>p~qlRtXtu}u7v`fGA)44Cn0a;P_mktRCXHx|fvdp>t^J%o`pc_V~TJXzL9 zO2VpT$IL^`yHD=3|L{w1=jmk-BhxQW_V-Bu>brPka-)yb=CeM0j3DD!Co9HCP5$XC z0^)E@7W4yK!aG?yR%&vrpGZAW6ykaY_OqDIH|DGEynpvo`d#(S^1oQ*TEKRFek~5s zBDfAyN7IqByQ2~f{5J$F&%Lkk*#@lR`-eD)4)JU>9reI?S>np!s#dF$r_EwE>*Mb8 zzrk95<{gA+k$H-y1*qf94CZKc`I#$Lu|-|`UTu375(M#55FPUTm^z$Jw6%x#x<2ch zvD5JWw6lz09X}@DGlFPgnTM(6Sjkf1VypF$*2fACKF^<33b7ccP#C7jOpcF| z@|w^RxOYmeS=i}PN1iO6kXcYwx)5`v7GRqD?`Zz1*8dlskI#8)_)WYy8LA_F^4th1 ziA3gmsh`4wSqp!&Iwif`cnvCL{itWUPhxCc6TG8sy}LSe>d>@wDY^AM)IV(2+jlsKCn#qlcF}cFkDJv!QEt$XHAcfTl2o)IhG#6Y#*&RT8T68zdT8-7ur^%rUmihWnBas?6?4K8#QX z<|2??sa2ErMoW2Jb~Vf5Ui3HpdhiQ_pL);BpvL`#8s~s%+}}UOl4t%fZTXYD!sX;# QUSRPBcKW}~-k~|102SlC(f|Me delta 586 zcmXAmPiPZC6vnf3rAS+AF^geJsll4mnkFedv_-UvT57UMY;=>&rlIiIJ$WdeyjY6|@lfo{?7-~%&71eWZ)T@b6)II> z_2X46DNb=A|7Z;>ieD^xw%%h$A?OO-!ERD&sV%qTS%|=`GL|r=`bFc@P$%|69QvS7 zbLfQ<<`6(6!{ICnHjJQT!#H|m;xd141mE=)CLi}~pECctHXRPZT(q9%5RJapVM@@**v;aPoDey zCHJ=X;oXHj@BSF`G8(xHbd!$uR{T^vqLHs(!m&i4#d^|@D~Ui`?N#0`aE; z8a{L+X@Nd~H!;7sXz5VBA#mm-!-Yt(qGy>gQK{a zW`*Fc5*~14_QPTMU diff --git a/.gradle/7.1/fileHashes/fileHashes.lock b/.gradle/7.1/fileHashes/fileHashes.lock index d8c858007a1727b75aa7fd64ed256a8f45b17e46..8dcd8daf76cb7e53d05ed623b919a6fae0eafe44 100644 GIT binary patch literal 17 VcmZR6t*}YBa<=Ot1~B032LLeZ1Z)5R literal 17 VcmZR6t*}YBa<=Ot1~A|=0{}3R1QP%N diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 93a297b6c4c6df713d71de5c92dfcf110b15d6f9..f41c9048564690a03f144d9e099596d6c13f4c74 100644 GIT binary patch literal 17 VcmZR6_T&GuLYbG|3}C?G2LMJN1)2Z= literal 17 VcmZR6_T&GuLYbG|3}C?G2mnSB1&sgz diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock index 340dbe959e23b22e80689a91ea901eb2be39e06c..3a8d490cff8a2403375e576a00258ad465c41460 100644 GIT binary patch literal 17 UcmZSHc6HyxsH7{$7$86k0713|UH||9 literal 17 UcmZSHc6HyxsH7{$7$86m070?^S^xk5 diff --git a/build/classes/java/main/com/example/AddressBook$CustomerMessage.class b/build/classes/java/main/com/example/AddressBook$CustomerMessage.class index 50347a35cbba5f697605deffbaf5c713aa7762f3..ddf8572944b99eb009f5a6b1682dfee6e29c7e73 100644 GIT binary patch delta 29 kcmaFE`G#|YFN>fG0}F#H11EzT10RDrgD``}fQ0}F#R11EzF10RDdgD`{KRN@2#1e(P#N-Tx)XcopA_d3E0&HTN)!DT8MeP_^8SEJZ85|jO z8Jrkg7@Qg08C)i(iLPe!oh&4lFBrtY!w}3M&Je;N#SqFM%MdhqlGrTKcm@uJ1O^d? rLRN@2#1e(P#N-Tx)XcopA_d2k$^2|$j0&4o*|hjYwHa6$bQlB~ zbb(Nh!G%Ge!JWZia*F6`M&ro>V)=p=3_J{$4B`w{3{ni%46+OslP8GH5_MqUU~ps* sVQ^wlWN-#T7lud%*U9$c-K<^=0u0`p&x`M3WaOXRB^e7e=7r=A0Aa}>4*&oF diff --git a/build/classes/java/main/com/example/AkkaMainSystem$Create.class b/build/classes/java/main/com/example/AkkaMainSystem$Create.class index 9ee57109448d402bdd0b718494676e59eaebc23c..ee93dfddf7853a48400b9086970e335422872018 100644 GIT binary patch delta 13 UcmeBS?qS{#&d4Y-HGo23`gk20jL520;dO1|bG527U%@AX^{EHUiS- NK-!W)c(OQaDgaZf2vYz6 diff --git a/build/classes/java/main/com/example/Customer$AddressHello.class b/build/classes/java/main/com/example/Customer$AddressHello.class index 0fadf18981a1c16d78962c6a3973f20a465e7add..6051d460b1b5c27e3f82f727cfc11c7f7dd818cd 100644 GIT binary patch delta 37 ncmeC<@8jQamzB|U@;%mEAnC(q2PC`M?1AKIHa8$C#9jjc;)M$q delta 37 ncmeC<@8jQamz7a#@;%mEAnC(q2PC`M?1AKIHa8$C#9jjc-rfq| diff --git a/build/classes/java/main/com/example/Customer$AddressMessage.class b/build/classes/java/main/com/example/Customer$AddressMessage.class index 2a8bdd7830a380e0dddddfce9f8f14e0c741429e..3e1d52e619865c1c4a98ebb62e166f910f5d727e 100644 GIT binary patch delta 47 ucmZ20v{q;XKRct@WC8Y8AUTcQ4oF^Qw+E7<9Bx2zA&2DTQVwk}s|Nr%whbr% delta 47 ucmZ20v{q;XKRcuLWC8Y8AUTcQ4oF^Qw+E7<9Bx2zA&2DTQVwk}s|NrxvJB<` diff --git a/build/classes/java/main/com/example/Customer$DeliveryMessage.class b/build/classes/java/main/com/example/Customer$DeliveryMessage.class index 2d279295e69077fb5396b2bb80b30a5ed8159e2e..04fdee4cb00c6af75760c95c56ec933840b54839 100644 GIT binary patch delta 21 ccmZ3=vXo`RHAYTl1{MYt22KXm$@dxE06lUA6#xJL delta 21 ccmZ3=vXo`RHAYS;1{MZs22KW<$@dxE06c#L`Tzg` diff --git a/build/classes/java/main/com/example/Customer$PickUpMessage.class b/build/classes/java/main/com/example/Customer$PickUpMessage.class index 5700afb6e11742bd52910443bbb03153b398f2e2..e6505948578a9bba2aa4186fff7cdd9bdb7442f9 100644 GIT binary patch delta 25 gcmdnVzLR}}6*I3s0}F!z11Eza10RFYWOwEw07U`>rvLx| delta 25 gcmdnVzLR}}6*I320}F#H11EzT10RF>WOwEw07D)GdjJ3c diff --git a/build/classes/java/main/com/example/Customer.class b/build/classes/java/main/com/example/Customer.class index 6731e3f633ecc414d6e78c598c33f42e3534f377..6266360274c042425deccbcdaf605dc075515dc6 100644 GIT binary patch delta 162 zcmWNLxeftQ004(%69tVk&uvSIgb)gi)k#$AY)N#IbrnLklei1}3jBat;+GV9KEP|H znJMOH{ETNv_-bf`DPvHjE_GqKn$i(-VdAAlgf==Ia&*blqlhV!(S|m_!%&W+?~JAV zge+4E%&4%S&r)&4jx~2|IgNeAR`olA?8$JT#8I^;Hk_p$zi3yI++Kl%<97MwBQ;VB H-t^}WC+8)A delta 162 zcmWNLxeftQ004(%69o!K6$y->0fg}g39guWqwFi>ztZqQ^9BT>y(h3TR delta 37 ncmdnQvx#TJW)?=t$y->0fg}g39guWqwFi>ztZqQ^9BT>y%n%AM diff --git a/build/classes/java/main/com/example/DeliveryCar$StartRoute.class b/build/classes/java/main/com/example/DeliveryCar$StartRoute.class index 6fbaa1b9d79229647b5f771308b41d5f211dc2fe..8d5746e288d4f7d11ab037d6bf12d2395d63ed55 100644 GIT binary patch delta 35 jcmX@cb&P9+A`7FzWF;0mAejgyMJI1%(E{=xu%rP1t_cap delta 35 jcmX@cb&P9+A`7GRWF;0mAejgyMJI1%(E{=xu%rP1sC5Z* diff --git a/build/classes/java/main/com/example/DeliveryCar.class b/build/classes/java/main/com/example/DeliveryCar.class index d5c06447d40f3031ce82bf995cdbdb46647ad8ab..873aefdb981ce7cff913508cb972b37a25ee987d 100644 GIT binary patch delta 268 zcmWNM-77M!=>yOp7LG;*(WSK54_mPb|RESb+T zU8{9x&3uvU5B1~Z%ug)7bh>-H#<0|PeAoX2J&lNPgVl3gEZW_HK4YkVe)EFs?(>*HXULQ&R7v<{?{LnmA6P5cUN zy(fF*ANUW>{RIb}u6hox?w;9kkPhOCM<=qawR%`0Cew?G0#Q zkWPkh7$#tZJfloAMu9+mI2CI`5_xpJ&=7lvD^p_hm#+Qk+B6^h> zkxQ%#8x+|jlKa3GPi*tT4pnw}XAjMR`b&StLMeJERgaX;l+0rqIZ;jCsd+|{b9LvH w%?tT`tA4y|vm$fub*cZc!LZbK_Sq`a%q1zV=;lU+xqVqy%SDE-;{#daA0@*z2LJ#7 diff --git a/build/classes/java/main/com/example/DistributionCenter$ArriveMessage.class b/build/classes/java/main/com/example/DistributionCenter$ArriveMessage.class index 0743378a6afdf58b24a89bea697ff3af26c0b2f4..1e3f50518b8a8ffcd1d5d702ccc470c448879fc6 100644 GIT binary patch delta 41 vcmaFG^@?jlI18^g0}F!>11Ezo10RFmG+20}Dd}11Ce`J7X0}F#Y11E#W-ddNa_+HdbG-^q7jCK#MHz*fnKwn%&ReVg_xF%`y@k!?&n@&Rx delta 281 zcmWNM%_>B37{-4`X*x0@rXio_m@&+lkZcuYtHwtfALXMNvA_c5jK-k`#aPULtn9b} z`mb!1l?!kMF2FVL^w#_K)bsqFUYoc1*OJ#2r;&DA>7biV2DHZ+W||RG_o~jQ@%2;>qV2(|BwxqTxutT65Ql!Q%&+PHRzWEt^cMp_0 zq=_T@lE^wU$3!`yms9#U6FwkAiCNB>r_2f$f`yt(s$B6X{X_-JHJ|c-ackR#B2M&9 zhSoBD2WTFgzlpqGBrtnRNaE$Mrjk diff --git a/build/classes/java/main/com/example/Paket.class b/build/classes/java/main/com/example/Paket.class index fd4ba52ac5f722b81152911c89e63f0155a59256..fe816e818d892de3806c79e289442b24d52952e6 100644 GIT binary patch delta 51 zcmaFJ{*ZkG8?&Go0}F#V11Ez710RDVgD`{CWO3$DL1mz*3Q$xPD5?e&Ri9kToB{y9 CtOl|G delta 51 zcmaFJ{*ZkG8?zt}0}BH$11AF?5b`q!GYCu;XATt<28xORMMZ(4Vn9*x$+gTW0JO#i AFaQ7m diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index ed4c6c34f972e2c32c21ff465a8c25fc0ab9c509..9dc2a9eeb7c8e76e084172ce3d5826aa03d6841b 100644 GIT binary patch delta 645 zcmV;00($-Wq5=A%0gx;Zkc3galzlc<%XL8vY7A7Gkvv{Vh7smVllrIZMfO~RT&JjZPP&d6L);5kJZE>Hq50EJ;|WpogP)EOoR2Q_XXs`Zy!a=wc& zO)*R-G5~~cVPqT-l$f0<111ynQ)qT)yF+rdGea~)0yO}PX>)XPX<~JBX>V>e0ET65 zbY*f7b1gEQ3FR7SUW5myMGZnlH%&MsGX@+G8NTk5>j5Qypxt8>=7QtLI}PXz!)14I zJxxAAKO`Ln2OJP#1KwrwS5pOX`vpQ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FXP$Sp*?X73>gY diff --git a/src/main/java/com/example/AddressBook.java b/src/main/java/com/example/AddressBook.java index ea57564..8b1706e 100644 --- a/src/main/java/com/example/AddressBook.java +++ b/src/main/java/com/example/AddressBook.java @@ -12,16 +12,26 @@ import java.util.Collections; import java.util.List; import java.util.Random; +/** + * AddressBook Actor class that maintains a list of customers and handles messages related to customer addresses. + * This actor can respond to requests for customer addresses and can provide the list of all customers. + */ public class AddressBook extends AbstractBehavior { + private final ArrayList> customers; + /** + * Interface for all messages that AddressBook can handle. + */ public interface Message {} - // Nachricht, wenn ein Empfänger nach einer Adresse fragt + /** + * Message sent by a customer asking for a random address from the AddressBook. + */ public static final class CustomerMessage implements Message { - public final ActorRef fragender; - public final String nameFragender; - public final ActorRef truckReference; + public final ActorRef fragender; // The customer actor sending the message + public final String nameFragender; // The name of the customer + public final ActorRef truckReference; // Reference to the delivery car public CustomerMessage(ActorRef fragender, String nameFragender, ActorRef truckReference) { this.fragender = fragender; @@ -30,23 +40,39 @@ public class AddressBook extends AbstractBehavior { } } - // Nachricht, um die Liste der Kunden abzurufen + /** + * Message to request the list of all customers. + */ public static final class GetCustomers implements Message { - public final ActorRef>> replyTo; + public final ActorRef>> replyTo; // Actor to reply to with the list of customers public GetCustomers(ActorRef>> replyTo) { this.replyTo = replyTo; } } + /** + * Constructor for AddressBook. + * Initializes the AddressBook with a list of customer actors and sends each customer an AddressHello message. + * + * @param context the actor context + * @param customers the list of customer actors + */ private AddressBook(ActorContext context, ArrayList> customers) { super(context); this.customers = new ArrayList<>(customers); + // Notify each customer with an AddressHello message for (ActorRef cst : this.customers) { cst.tell(new Customer.AddressHello(getContext().getSelf())); } } + /** + * Factory method to create a new AddressBook actor. + * + * @param customers the list of customer actors + * @return the behavior of the AddressBook actor + */ public static Behavior create(ArrayList> customers) { return Behaviors.setup(context -> new AddressBook(context, customers)); } @@ -59,19 +85,29 @@ public class AddressBook extends AbstractBehavior { .build(); } - // Methode, um einen zufälligen Empfänger auszugeben + /** + * Handles CustomerMessage by selecting a random customer from the list and sending their address to the requesting customer. + * + * @param msg the customer message requesting a random address + * @return the behavior of the AddressBook actor + */ private Behavior onCustomerMessage(CustomerMessage msg) { Random random = new Random(); int index = random.nextInt(customers.size()); ActorRef addressOf = customers.get(index); - getContext().getLog().info("{} hat nach einer Addresse gefragt CAR: {} ", msg.nameFragender, msg.truckReference.path().name()); + getContext().getLog().info("{} hat nach einer Adresse gefragt CAR: {}", msg.nameFragender, msg.truckReference.path().name()); msg.fragender.tell(new Customer.AddressMessage(addressOf, msg.truckReference)); return this; } - // Methode, um die Liste der Kunden zu senden + /** + * Handles GetCustomers message by replying with the unmodifiable list of customers. + * + * @param msg the get customers message + * @return the behavior of the AddressBook actor + */ private Behavior onGetCustomers(GetCustomers msg) { msg.replyTo.tell(Collections.unmodifiableList(customers)); return this; } -} \ No newline at end of file +} diff --git a/src/main/java/com/example/AkkaMainSystem.java b/src/main/java/com/example/AkkaMainSystem.java index 24f1d53..6cbd349 100644 --- a/src/main/java/com/example/AkkaMainSystem.java +++ b/src/main/java/com/example/AkkaMainSystem.java @@ -5,45 +5,75 @@ import akka.actor.typed.Behavior; import akka.actor.typed.javadsl.*; import java.util.ArrayList; -import java.util.List; + +/** + * AkkaMainSystem Actor class that initializes the system with customers, an address book, and a distribution center. + */ public class AkkaMainSystem extends AbstractBehavior { + /** + * Message to trigger the creation of the AkkaMainSystem. + */ public static class Create {} + /** + * Factory method to create a new AkkaMainSystem actor. + * + * @return the behavior of the AkkaMainSystem actor + */ public static Behavior create() { return Behaviors.setup(AkkaMainSystem::new); } - // Statische Referenz auf das DistributionCenter + // Static reference to the DistributionCenter actor private static ActorRef distributionCenter; - // Statische Methode zum Abrufen der DistributionCenter-Referenz + /** + * Static method to retrieve the reference of the DistributionCenter actor. + * + * @return the DistributionCenter actor reference + */ public static ActorRef getDistributionCenter() { return distributionCenter; } + /** + * Constructor for AkkaMainSystem. + * Initializes the system by creating customers, an address book, and a distribution center. + * + * @param context the actor context + */ private AkkaMainSystem(ActorContext context) { super(context); - // Erstellen des Adressbuchs + // Creating the list of customer actors ArrayList> customers = new ArrayList<>(); customers.add(getContext().spawn(Customer.create("Alice"), "alice")); customers.add(getContext().spawn(Customer.create("Bob"), "bob")); customers.add(getContext().spawn(Customer.create("Charles"), "charles")); customers.add(getContext().spawn(Customer.create("Derick"), "derick")); + + // Creating the AddressBook actor with the list of customers ActorRef addressBook = getContext().spawn(AddressBook.create(customers), "addressBook"); - // Erstellen des Verteilzentrums + // Creating the DistributionCenter actor with the address book reference distributionCenter = getContext().spawn(DistributionCenter.create(addressBook), "distributionCenter"); - } @Override public Receive createReceive() { - return newReceiveBuilder().onMessage(Create.class, this::onCreate).build(); + return newReceiveBuilder() + .onMessage(Create.class, this::onCreate) + .build(); } + /** + * Handles the Create message. Additional setup can be done here if needed. + * + * @param command the create command + * @return the behavior of the AkkaMainSystem actor + */ private Behavior onCreate(Create command) { // Additional setup if needed return this; diff --git a/src/main/java/com/example/Customer.java b/src/main/java/com/example/Customer.java index 5708cb7..418b526 100644 --- a/src/main/java/com/example/Customer.java +++ b/src/main/java/com/example/Customer.java @@ -11,15 +11,24 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Random; +/** + * Customer Actor class that simulates a customer in the system. + * This actor can receive packages, send packages, and interact with an address book. + */ public class Customer extends AbstractBehavior { String name; ActorRef adrBook; ArrayList gegenstaende = new ArrayList<>(Arrays.asList("Spülmaschine","Altes CD-Regal", "Goldbarren","20kg Hanteln", "Holzkohlegrill","Blumenerde")); + /** + * Interface for all messages that Customer can handle. + */ public interface Message {} - //Delivery Nachricht Typ + /** + * Message representing a delivery of a package to the customer. + */ public static final class DeliveryMessage implements Message { public final Paket paket; @@ -28,7 +37,9 @@ public class Customer extends AbstractBehavior { } } - //Pickup Nachricht Typ + /** + * Message representing a request to pick up a package from the customer. + */ public static final class PickUpMessage implements Message { public final ActorRef truckReference; public final String someString; @@ -42,11 +53,25 @@ public class Customer extends AbstractBehavior { public record AddressHello(ActorRef book) implements Message {} public record AddressMessage(ActorRef addresse, ActorRef truckReference) implements Message {} + /** + * Constructor for Customer. + * Initializes the customer with a name. + * + * @param context the actor context + * @param name the name of the customer + */ private Customer(ActorContext context, String name){ super(context); this.name = name; } + + /** + * Factory method to create a new Customer actor. + * + * @param name the name of the customer + * @return the behavior of the Customer actor + */ public static Behavior create(String name) { return Behaviors.setup(context -> new Customer(context, name)); } @@ -62,15 +87,26 @@ public class Customer extends AbstractBehavior { .build(); } - //Hier wird das Adressbuch gespeichert, nachdem es sich gemeldet hat + /** + * Stores the address book reference when received. + * + * @param msg the AddressHello message + * @return the behavior of the Customer actor + */ private Behavior onAddressHello(AddressHello msg){ this.adrBook = msg.book; return this; } - //Verhalten, wenn Pickup Nachricht eingegangen ist - //Wenn 80% getroffen wurden, wird eine Anfrage an das Adressbuch geschickt und die Antwort - // an anderer Stelle (onAddressMessage) verarbeitet, um das Paket zu verschicken + /** + * Handles the PickUpMessage by deciding whether to send a package. + * If a random number is less than or equal to 80, a request is sent to the address book + * to get a random customer address, and the package is then sent. + * Otherwise, logs that no package will be sent. + * + * @param msg the PickUpMessage + * @return the behavior of the Customer actor + */ private Behavior onPickUpMessage(PickUpMessage msg){ getContext().getLog().info("Kunde {}, will kein Paket abschicken CAR: {}", this.name, msg.truckReference.path().name()); Random random = new Random(); @@ -89,7 +125,12 @@ public class Customer extends AbstractBehavior { return this; } - //Adresse des Empfängers von dem Adressbuch empfangen und das Paket wird in den Truck geladen und verschickt + /** + * Handles the AddressMessage by creating a package with a random item and sending it to the truck. + * + * @param adr the AddressMessage + * @return the behavior of the Customer actor + */ private Behavior onAddressMessage(AddressMessage adr){ Random random = new Random(); int index = random.nextInt(gegenstaende.size()); @@ -100,7 +141,12 @@ public class Customer extends AbstractBehavior { return this; } - //Verhalten, wenn Paket eingegangen ist + /** + * Handles the DeliveryMessage by logging the received package details. + * + * @param pkt the DeliveryMessage + * @return the behavior of the Customer actor + */ private Behavior onDeliveryMessage(DeliveryMessage pkt){ getContext().getLog().info("Ich habe ein Paket von {} erhalten mit dem Inhalt: {} ", pkt.paket.absender, pkt.paket.inhalt); return this; diff --git a/src/main/java/com/example/DeliveryCar.java b/src/main/java/com/example/DeliveryCar.java index 640e7cf..1aee6ec 100644 --- a/src/main/java/com/example/DeliveryCar.java +++ b/src/main/java/com/example/DeliveryCar.java @@ -10,36 +10,77 @@ import java.util.List; import static com.example.AkkaMainSystem.getDistributionCenter; +/** + * DeliveryCar class that simulates a delivery car in the system. + * This actor can load packages, follow a delivery route, and pick up packages from customers. + */ public class DeliveryCar extends AbstractBehavior { + // Liste der Pakete im Lieferwagen private final ArrayList pakete = new ArrayList<>(); + // Route mit Kunden, die abgefahren wird private final ArrayList> route; + // Maximale Kapazität des Lieferwagens private final int maxCapacity = 3; + // Timer zum Planen von Zustellungen private final TimerScheduler timers; + // Globaler Index für die aktuelle Position auf der Route private int globalIndex = 0; + /** + * Interface for all messages that DeliveryCar can handle. + */ public interface Message {} + /** + * Message to load packages into the delivery car. + */ public record LoadMessage(List pakete) implements Message {} + /** + * Message representing the response from a customer when a package is picked up. + */ public record PickupResponse(Paket paket) implements Message {} + /** + * Message to start the delivery route. + */ public record StartRoute() implements Message {} + /** + * Message to check the next stop on the route. + */ public record CheckStop() implements Message {} - public record Clear() implements Message {} // Clear all packages in the delivery car + /** + * Message to clear all packages in the delivery car. + */ + public record Clear() implements Message {} + /** + * Constructor for DeliveryCar. + * + * @param context the actor context + * @param timers the timer scheduler + * @param route the delivery route + */ private DeliveryCar(ActorContext context, TimerScheduler timers, ArrayList> route) { super(context); this.route = route; this.timers = timers; } + /** + * Factory method to create a new DeliveryCar actor. + * + * @param route the delivery route + * @return the behavior of the DeliveryCar actor + */ public static Behavior create(List> route) { return Behaviors.setup(context -> Behaviors.withTimers(timers -> new DeliveryCar(context, timers, new ArrayList<>(route)))); } + // Handling of the various messages the DeliveryCar can receive @Override public Receive createReceive() { return newReceiveBuilder() @@ -51,7 +92,12 @@ public class DeliveryCar extends AbstractBehavior { .build(); } - //Nachricht, um Pakete zu beladen von DistributionCenter z.B. + /** + * Handles the LoadMessage to load packages into the delivery car. + * + * @param msg the LoadMessage + * @return the behavior of the DeliveryCar actor + */ private Behavior onLoadMessage(LoadMessage msg) { pakete.addAll(msg.pakete); getContext().getLog().info("Laden: {} Pakete wurden in den LKW geladen.", msg.pakete.size()); @@ -59,8 +105,12 @@ public class DeliveryCar extends AbstractBehavior { return this; } - - //Die Nachricht, die den Paket, vom Kunden abholt und in den Wagen lädt + /** + * Handles the PickupResponse to pick up a package from a customer. + * + * @param rsp the PickupResponse + * @return the behavior of the DeliveryCar actor + */ private Behavior onPickupResponse(PickupResponse rsp) { if (rsp.paket != null && rsp.paket.inhalt != null && pakete.size() < maxCapacity) { pakete.add(rsp.paket); @@ -70,7 +120,13 @@ public class DeliveryCar extends AbstractBehavior { return this; } - //Prüft, ob der Wagen schon alle Addressen durchgegangen ist und geht zum Verteilerzentrum, sonst. geht dieser seine Route weiter + /** + * Checks if the delivery car has completed the route and returns to the distribution center. + * Otherwise, it moves to the next stop. + * + * @param stop the CheckStop message + * @return the behavior of the DeliveryCar actor + */ private Behavior onCheckStop(CheckStop stop) { if (globalIndex >= route.size()) { getContext().getLog().info("Rückkehr: Der LKW kehrt zum Verteilzentrum zurück mit {} Paketen.", pakete.size()); @@ -90,26 +146,43 @@ public class DeliveryCar extends AbstractBehavior { return this; } - //Methode, um die Autos zu "starten" + /** + * Starts the delivery route. + * + * @param msg the StartRoute message + * @return the behavior of the DeliveryCar actor + */ private Behavior onStartRoute(StartRoute msg) { globalIndex = 0; scheduleNextStopCheck(Duration.ofSeconds(3)); // Start checking the first stop after 3 seconds return this; } - // + /** + * Clears all packages in the delivery car. + * + * @param clear the Clear message + * @return the behavior of the DeliveryCar actor + */ private Behavior onClear(Clear clear) { pakete.clear(); return this; } - //Sendet eine Nachricht an Customer bzw. an einen Addressaten, wo der Wagen steht, und fragt ob ein Paket von denen geliefert werden soll + /** + * Sends a pickup message to a customer to ask if they have a package to send. + * + * @param customer the customer actor reference + */ private void sendPickupMessage(ActorRef customer) { customer.tell(new Customer.PickUpMessage(getContext().getSelf(), "Der LKW kann das Paket abholen.")); } - - //Liefert Paket aus, die im Wagen ist + /** + * Delivers packages that are meant for the current customer. + * + * @param customer the customer actor reference + */ private void deliverPackages(ActorRef customer) { pakete.removeIf(paket -> { if (paket.empfaenger.equals(customer)) { @@ -120,7 +193,11 @@ public class DeliveryCar extends AbstractBehavior { }); } - //Private Methode für den Timer + /** + * Schedules the next stop check after a given duration. + * + * @param duration the duration after which to check the next stop + */ private void scheduleNextStopCheck(Duration duration) { timers.startSingleTimer(new CheckStop(), duration); } diff --git a/src/main/java/com/example/DistributionCenter.java b/src/main/java/com/example/DistributionCenter.java index 10a1992..2d4fb32 100644 --- a/src/main/java/com/example/DistributionCenter.java +++ b/src/main/java/com/example/DistributionCenter.java @@ -11,14 +11,27 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +/** + * Die Klasse `DistributionCenter` repräsentiert das Verteilzentrum im System. + * Das Verteilzentrum empfängt Pakete von Lieferwagen, speichert sie und generiert Routen für Lieferwagen. + */ public class DistributionCenter extends AbstractBehavior { - + // Referenz auf das Adressbuch private final ActorRef addressBook; - public static class StartAllRoutes implements Message {} - + // Liste der Pakete im Lager private final List lagerraum = new ArrayList<>(); + // Liste der Lieferwagen private final List> deliveryCars = new ArrayList<>(); + public static class StartAllRoutes implements Message {} + + + /** + * Konstruktor für das Verteilzentrum. + * + * @param context das Actor-Kontext + * @param addressBook Referenz auf das Adressbuch + */ private DistributionCenter(ActorContext context, ActorRef addressBook) { super(context); this.addressBook = addressBook; @@ -40,12 +53,21 @@ public class DistributionCenter extends AbstractBehavior create(ActorRef addressBook) { return Behaviors.setup(context -> new DistributionCenter(context, addressBook)); } - + // Definition der Nachrichten für das Verteilzentrum interface Message {} + /** + * Nachricht, die ankommende Pakete vom Lieferwagen enthält. + */ public static class ArriveMessage implements Message { private final List pakete; private final ActorRef truck; @@ -64,6 +86,9 @@ public class DistributionCenter extends AbstractBehavior> customers; @@ -85,6 +110,12 @@ public class DistributionCenter extends AbstractBehavior onArriveMessage(ArriveMessage msg) { // Füge alle Pakete aus der Ankunftsnachricht dem Lagerraum hinzu List arrivedPackages = msg.getPakete(); @@ -106,12 +137,23 @@ public class DistributionCenter extends AbstractBehavior onGenerateRoutes(GenerateRoutes msg) { List> customers = msg.getCustomers(); generateRoutes(customers); return this; } + /** + * Generiert Routen für Lieferwagen. + * + * @param customers die Liste der Kunden + */ private void generateRoutes(List> customers) { if (customers == null || customers.isEmpty()) { getContext().getLog().info("Kundenliste ist leer oder null. Keine Routen generiert."); @@ -135,6 +177,12 @@ public class DistributionCenter extends AbstractBehavior onStartAllRoutes(StartAllRoutes msg) { for (ActorRef deliveryCar : deliveryCars) { deliveryCar.tell(new DeliveryCar.StartRoute()); @@ -142,6 +190,12 @@ public class DistributionCenter extends AbstractBehavior> generateRandomRoute(List> customers) { List> route = new ArrayList<>(customers); Collections.shuffle(route); diff --git a/src/main/java/com/example/Paket.java b/src/main/java/com/example/Paket.java index 5ebdb42..6fb9041 100644 --- a/src/main/java/com/example/Paket.java +++ b/src/main/java/com/example/Paket.java @@ -2,20 +2,36 @@ package com.example; import akka.actor.typed.ActorRef; - +/** + * Paket class that represents a package in the system. + */ public class Paket { + // Inhalt des Pakets String inhalt; + // Absender des Pakets String absender; + // Empfänger des Pakets ActorRef empfaenger; - // Konstruktor, der nur den Inhalt annimmt + /** + * Constructor that initializes a package with only the content. + * The sender and recipient are optional and can be set later. + * + * @param inhalt the content of the package + */ Paket(String inhalt) { this.inhalt = inhalt; - this.absender = null; // Absender und Empfänger können optional sein - this.empfaenger = null; + this.absender = null; // Absender ist optional + this.empfaenger = null; // Empfänger ist optional } - // Konstruktor mit allen Parametern + /** + * Constructor that initializes a package with content, sender, and recipient. + * + * @param inhalt the content of the package + * @param absender the sender of the package + * @param empfaenger the recipient of the package + */ Paket(String inhalt, String absender, ActorRef empfaenger) { this.inhalt = inhalt; this.absender = absender;