I’‘m interested in creating a Gateway for Yahoo and was curious what the best way to implement this. I’‘ve spent some time getting familiar with the code base, but want your feedback regarding the best way to build this. I’'m using jYMG library that associates a user to a session. I would need to translate the JID to the jYMG library and maintain that association.
It looks like I’‘d need to build a Component or Plugin that handles this. Then maintain a map between active JIDs and their corresponding jYMG session (I’'m not too concerned about saving username/password combos at this point, I just want to get it to work).
I was also looking at the s2s implementation and realized that this is too low level for what I need. jYMG handles the (bidi) connection with the server so I need something a step higher. I was looking at the RoutingTableImpl and it looks like I need to create a collection of domains that are associated with gateways (MSN, AIM, etc) that get routed to the appropriate RoutableChannelHandler.
Does this seem reasonable? The RoutableChannelHandler seems like the most likely place to maintain the JID/jYMG sessions and handle the processing of the requests, the only question is how do I get callbacks from jYMG back into place? Do I just get the RoutingTable and call route going the opposite direction?