This Page is a little outdated .. and targeted at Galena1 where i tried to remain the roots
as modular java bot .. The answer on .. What is Galena2 is a little bit more easy
(copied from the Start Page):Galena was designed as modular bot to serve commands on various protocols (jabber,irc,email,http,ftp).
Because of it's design it developed to a framework for server side applications, esspecially web applications and Content Management Systems.So … what is Galena ? noone knows i guess .. but anyway .. if something is not clear, please write me a mail/message :) firstname.lastname@example.org (jabber and email address) or icq: 50647169 - thanks
Galena is a framework for applications to transparently utilities various interfaces. For example you can write a simple Hello World modul which will answer on all 'hello' messages with a 'Hello World'.
In your Model you would only write msg.reply("Hello World") without knowing if the user wrote that message on IRC in a channel, private message or on Jabber, ICQ, AIM or is directly connected using telnet...But this is not all galena can do. One good example is this website which is only a Module of Galena. Of course a web site is a little bit more complex than a Hello World .. because you need to return HTML .. with theme files, etc. So this is not transparent any more since it uses URLHandler instead of MessageHandler/CommandHandler .. and returns a template (velocity template) instead of replying by msg.reply() ..But a URLHandler is only a subclass of CommandHandler and uses the same interface as every other module. it's just another layer of abstraction. Anyway .. but why should anyone use a strange URLHandler instead of a simple servlet..Lets take a look at another module of galena - Inosit - It's actually a collection of modules and a new Project which is not included in the normal galena download (check http://inosit.sphene.net).Inosit is a Project Management Tool with a Tracker, Calendar, etc. it has a command line interface, GUI (using SWT) and web interface. But the whole logic was only implemented once. - as the command line interface - All other interfaces use those commands internally to retrieve data and modify data.e.g. http://galena.sphene.net/tracker - to make such a list of tracker items the URLHandler sends a internal message called "tracker item list" and puts it into the velocity template.(short note: with "Command Line Interface" in galena i mean a interface which can be called in a telnet session, via irc, or whatever .. so by simple text and not by a web interface or something like that
To make it easier and faster to pipe every request through the command line interface i redesigned the way modules work so that it is not needed to register CommandHandler, but that they are defined in an XML file and the methods are called using the java reflection API - so the web interface can directly call the method and don't have to serialize the request into a text string - this should be much fasterIn addition i've made a proxy which makes it possible to transparently call methods on another machine (a very simple form of remote method invocation) - take a look at a very simple examle: http://cvs.yourhell.com/viewcvs.cgi/galenaaddins/src/galena/addins/modules/test/TestClass.java?rev=1.3&cvsroot=Galena&content-type=text/vnd.viewcvs-markup (in the last method it uses this proxy class)