{"id":38,"date":"2007-03-29T14:58:12","date_gmt":"2007-03-29T13:58:12","guid":{"rendered":"http:\/\/technologies.kmi.open.ac.uk\/msg\/developer\/msg-source-code-overview\/"},"modified":"2007-06-14T11:01:25","modified_gmt":"2007-06-14T10:01:25","slug":"msg-source-code-overview","status":"publish","type":"page","link":"http:\/\/technologies.kmi.open.ac.uk\/msg\/developer\/msg-source-code-overview\/","title":{"rendered":"MSG Source Code Overview"},"content":{"rendered":"

The following sections are just a brief summary of some of the main files and classes, but they are a good starting point if you are looking at the code for the first time.<\/p>\n

BuddyXML<\/h2>\n

uk.ac.open.kmi.buddyxml.BuddyXMLServlet<\/a><\/em><\/strong><\/p>\n

All interactions with buddyxml pass through this class, so it’s a good place to start. One instance of CommandProcessor<\/em> is created for each tomcat session. This is the only object instance that buddyxml stores within a tomcat session. (Note that the CommandProcessor object is not currently serializable, so sessions can not be transferred between tomcat servers)<\/p>\n

BuddyXMLServlet creates an XML document object for each transaction, the document is populated with information by CommandProcessor. The final part of each transaction serializes the XML document (or converts it to JSON encoding) for output in the HTTP response.<\/p>\n

uk.ac.open.kmi.buddyxml.CommandProcessor<\/a><\/p>\n

The set of commands supported by CommandProcessor<\/em> is calculated by using java reflection to enumerate the methods of interface InstantMessagingClient<\/em>.  Commands are processed by calling methods of an implementation of InstantMessagingClient<\/em>. The method called is the one matches the value specified for the command<\/em> argument in the request URL.  The only implementation of InstantMessagingCient<\/em> currently used is class JabberInstantMessagingClient<\/em>. This is the default client class, but a different implementation can be specified using the request URL parameter client<\/em> set to the full class name.<\/p>\n

uk.ac.open.kmi.buddyxml.jabber.JabberInstantMessagingClient<\/a><\/p>\n

This is the default implementation of interface InstantMessagingClient<\/em>. This class opens and maintains Jabber\/XMPP client connection to a Jabber Server.  Basically it translates BuddyXML commands into XMPP, and builds the XML document response that is returned by BuddyXMLServlet<\/em>. <\/p>\n

Wildfire-extras<\/h2>\n

uk.ac.open.kmi.wildfire.auth.MultiAuthProvider<\/a><\/p>\n

The ‘authenticate’ method of this class is called whenever a user logs in to the Openfire server. This is where replication of externally provided users and groups is initiated.<\/p>\n

uk.ac.open.kmi.wildfire.user.MultiUserProvider<\/a><\/p>\n

The ‘loadUser’ method of this class calls is called whenever a User object is required which maps to the passed in username. For most purposes, replicated users are treated that same as other local Openfire users, so the only purpose of the method is to provide the mapping between authenticed username, and the username that was actually created for that user by the replication process. <\/p>\n

Wildfire User Web Admin<\/h2>\n

uk.ac.open.kmi.wildfire.plugin.UserWebAdminPlugin<\/a><\/p>\n

This class contains the ‘core’ functionality of the plugin that is used to drive the user interface of the JSP pages listed below. <\/p>\n

userwebadmin-prop-form.jsp<\/a><\/p>\n

The plugin configuration accessed from the Openfire admin console<\/p>\n

index.jsp<\/a><\/p>\n

User login page. Also allows password reset request via email.<\/p>\n

setpwd.jsp<\/a><\/p>\n

Allows user to set password policy and to set local password.<\/p>\n

userwebadmin.jsp<\/a><\/p>\n

Displays current user profile inclusing group membership <\/p>\n

groupedit.jsp<\/a><\/p>\n

Allows the user to display\/edit membership a Openfire group<\/p>\n

user-create.jsp<\/a><\/p>\n

Allows group admins to create new users.<\/p>\n

Wildfire Mashup<\/h2>\n

uk.co.iconographics.wildfire.plugin.mashup.MashupPlugin<\/a><\/p>\n

This class contains the ‘core’ functionality of the plugin.<\/p>\n

mashup-service.jsp<\/a><\/p>\n

The plugin configuration accessed from the Openfire admin console<\/p>\n

MSG Client<\/h2>\n

index.html<\/a><\/p>\n