WeatherComponent.java sample code cutoff?

I’m looking at writing my own components. I went to:

http://svn.igniterealtime.org/svn/repos/whack/trunk whack

and checked out WeatherComponent.java and ExternalWeatherComponent.java but it looks like the WeatherComponent.java code gets cutoff?? The last line I can view is “public void initialize(JID jid, ComponentManager”.

I’d like to see the sample useage of overriding the initialize() method as well as the shutdown() method. Does anyone have the working source or would like to quickly explain what the initialize() and shutdown() methods ought to do?

Thanks!

Barry

Hi Barry,

It seems to work fine for me. Maybe there is a problem with your browser? You could certainly check the code out using a subversion client.

Cheers,

Ryan

Thanks, Ryan. I actually did try just viewing it in my browser and it worked. I was using TortoiseSVN and checking out the code and it cuts off after line 99 every time for some reason.

Are there any examples of when you would need to override the initialize() and shutdown()'s with anything XMPP/Openfire specific (or are these methods basically conveniences for constructor/destructor methods of other variables we might want to set on startup and shutdown of our specific components?).

Thanks for your contributions to the project by the way (the helpful MoTD tutorial)!

-Barry

Hi Barry,

That’s odd about TortoiseSVN cutting off the file like that…

I’m not aware of any examples showing when you would need to override those methods. If you’re developing a plugin/component the important thing to remember is that you want to leave Openfire in the same state that it was in prior to your plugin being loaded.

Hope that helps,

Ryan

PS - Glad you liked the MotD tutorial.