Nearing Ad-hoc Completion

Posted by Trejkaz Wed, 19 Jan 2005 02:00:00 GMT

I’ve completed the reworking of my JEP-0050-compliant XMPP bot into JSO. Ad-hoc commands were relatively easy to implement, and I’ve done a bit of a better job of separating out the responsibilities in the new code.

ServiceDiscoveryManager maintains a mapping from node IDs to Discoverable objects, and it is the Discoverable’s job to populate the disco#items and disco#info responses as appropriate.

CommandManager maintains a mapping from command node to CommandHandler, and CommandHandlers are Discoverable, so you can discover commands. The CommandManager itself is also discoverable, in order for clients to discover the list of valid commands. I made the bot itself discoverable as well, and hooked the service discovery up so that discovery on the bot not only listed “commands” as a feature, but listed the child item for easier navigation. :-)

Read more...

Tags , ,

Jabber Bot Rewrite

Posted by Trejkaz Fri, 14 Jan 2005 01:40:00 GMT

Since the prototype of my Jabber bot which I’ve been using to make weblog posts is doing quite well, I figured it was time to tidy it up and get everything in order.

Leaving Smack behind, I moved to using JSO, whose protocol support is a lot more comprehensive than Smack’s anyway. It took a while to bang everything together some kind of order, but I think I’m finally there.

I just need to port the Ad-hoc Command stuff over, which can’t be as hard as the query framework was. Then I need to build in the ability to easily extend the bot, and then I can just port over the weblog poster.

Tags , ,