Writing an FM Service
This document is targeted for developers who want to add an
FMService within the provided framework instead of re-writing
a TCUP-based P2P application. The advantages are that Contacts
and Node Management are doing for the user either as part of the
FMNexus itself or as another service which plugs into the FMNexus.
There are a few matters which the developer must attend to beyond
simply implementing an FMService (or a Configurable if they would like
to use the GUI and configuration management) Java class.
How the Configurable Class is First Instantiated.
In the FastMessengerConfiguration class
(found in the package org.fastmessaging.gui) there is a method called
buildAndConfigure which is called to instantiate the first instace
of a class. The developer must add into that method some code
(most likely after the pattern of what is already there) to build a
default instance of their service and optionally configure it. No
deep magic at all and most likely no more than 4-8 lines of code
(including lines with parenthesies on them).
That's pretty much it. More to follow if need be.