Hi group, I have implemented a customized mailbox following this official document http://doc.akka.io/docs/akka/current/java/mailboxes.html. The customized mailbox works fine. However, my question is how do I create a parameterized mailbox so that additional parameters can be passed into the mailbox when creating it?
In the example of the document, it seems that the signature of the constructor of the customized mailbox is fixed as follows 1. // This constructor signature must exist, it will be called by Akka 2. public MyUnboundedJMailbox(ActorSystem.Settings settings, Config config) { 3. // put your initialization code here 4. } I am wondering if there is a way to pass additional parameters into this constructor? Here is the usage scenario of my customized mailbox. I want to create different mailboxes for different *actor instances. *However, these mailboxes share similar functionality, but behave differently based on only an additional parameter. Currently, I have to hard code the parameter into the mailbox class. As a result, I have to create a different mailbox class for a different parameter. If there is a way to create a parameterized mailbox, then I only have to create one mailbox class. Please let me know if this is possible! Thank you! Sihan -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.