Embedding Mireka
- Add the libraries which are used by Mireka into your project.
You can copy them from the
lib
directory of the tarball.
If you only use a small subset of the functionality then you may omit some jars.
- For assembly and configuration you have two choices:
- Instead of using the usual configuration files, assemble Mireka objects in your own code.
The configuration files are executable JavaScript code, consider them as recipes.
After the assembly a few threads must be started, objects must be initialized. The methods which must be
called are marked with the
@PostConstruct
annotation.
Search for this annotation for a complete list, however the main classes with such methods:
mireka.smtp.server.SMTPServer.start()
mireka.pop.PopServer.start()
mireka.transmission.queue.ScheduleFileDirQueue.start()
- You can use the the same JavaScript configuration system as the standalone Mireka.
In this case just call
the mireka.startup.Start.main()
function to initialize Mireka.
- Some Java system properties might need to be initialized. Use
bin/start.sh
as a guide.