Your Component implementation will get passed a ComponentManager instance (in the initialize method). You can use the sendPacket method of the ComponentManager to send your messages.
Component implementations typically either run inside an Openfire plugin, or as an external, stand alone process (using Whack). The latter seems more applicable to you. Whack used to feature war-like behavior (allowing you to turn it into a webapplication), but I’m not sure if that’s still functional.
I’d advise you to first create a simple Component implementation that uses an XMPP-provided trigger (for instance, have it respond to messages that it receives). You can implement the Component interface yourself - extending AbstractComponent (from Tinder) might be just as easy.
After you’ve done that, try hooking it up into the framework you want to use. Lastly, make it respond to the events that should trigger your functionality.
ExternalComponent myComponent = new ExternalComponent();
myComponent.connect(host, port, secret);
myComponent.send(toJID, subject, body);
myComponent.disconnect();
}
}
I don’t want that my component runs in background and is triggered by something…
Do you think I should use a “client” library? The problem in that case, is that our client must filter incoming messages and not display those from this special contact…