Hi Viktor, My bad I think we already follow the super class approach and just register the super class for serialization and therefore the second question is not relevant. Thanks for the feedback!
On Wednesday, January 15, 2014 1:39:07 AM UTC-8, √ wrote: > > HI Vijay, > > > On Wed, Jan 15, 2014 at 12:51 AM, vijay krishna > <vijaycapr...@gmail.com<javascript:> > > wrote: > >> Hey Viktor, >> >> I have a question about the usage of Custom Serializers. I have this is >> my configuration in application.conf >> >> serializers { >> myown = "AkkaSer.CustomSerializer" >> } >> serialization-bindings { >> "java.lang.String" = myown >> "java.lang.Boolean" = myown >> "com.mypackage.events.myEvent" = myown >> } >> >> >> Here it is clear that the above 3 classes String, Boolean and myEvent are >> serialized via CustomSerializer. >> >> 1. Is there a way to say I want every class to be serialized via >> CustomSerializer or do I have to register every class manually? >> > > Give a shared parent class or shared interface. > > >> 2. I am not sure how I can add new classes to the serialization-bindings >> section once an ActorSystem has started with the above Config (without >> stopping it). >> > > You can't. > > >> >> I can definitely add methods in the CustomSerializer class to register >> new classes at runtime but the problem is the new classes don't get >> serialized via CustomSerializer because the serialization-bindings section >> doesn't have it! >> > > May I ask why you do not know which classes you have in your system until > runtime (after initialization)? > > Cheers, > √ > > >> >> On Monday, January 13, 2014 1:13:02 PM UTC-8, √ wrote: >> >>> Yes >>> On Jan 13, 2014 10:04 PM, "vijay krishna" <vijaycapr...@gmail.com> >>> wrote: >>> >>>> I see what you mean, its the code in my custom serializer that should >>>> handle it and has nothing to do at the application.conf level right? >>>> >>>> -- >>>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>> >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>> >>>>>>>>>> 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+...@googlegroups.com. >>>> To post to this group, send email to akka...@googlegroups.com. >>>> >>>> Visit this group at http://groups.google.com/group/akka-user. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >> >>>>>>>>>> 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+...@googlegroups.com <javascript:>. >> To post to this group, send email to akka...@googlegroups.com<javascript:> >> . >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Cheers, > √ > > * Viktor Klang* > *Director of Engineering* > Typesafe <http://www.typesafe.com/> > > Twitter: @viktorklang > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/groups/opt_out.