REQUIREMENT mime.plugin.accessfilter.howto |
Type | NEW |
Priority | HIGH |
Status | CLOSED |
Topic | XmlBlaster supports to plugin your own access message filters |
Des cription |
XmlBlaster allows to code your own specific plugins to filter messages looking into their content. The plugin is MIME aware, allowing to code different plugins for different message MIME types. A MIME type is for example "text/xml" or "audio/midi" or your own specific message MIME type like "application/cool". The mime type "*" registers the plugin for all message MIME types. There is an example xmlBlaster/src/java/org/xmlBlaster/engine/mime/demo/ContentLenFilter.java showing how to code your plugin. Just take a copy of this and change the parts you want. Note that each plugin type is loaded only once (it is a singleton in Global scope), this instance handles all clients which have configured it on subscribe() or get() calls These are the steps to implement your plugin:
|
Example Java |
For an example look at the code of ContentLenFilter.java (link below). |
Configure |
NOTE: Configuration parameters are specified on command line (-someValue 17) or in the
xmlBlaster.properties file (someValue=17). See requirement "util.property" for details. |
See API | org.xmlBlaster.engine.mime.I_AccessFilter |
See API | org.xmlBlaster.engine.mime.demo.ContentLenFilter |
See API | org.xmlBlaster.contrib.mime.DropIfNotDeliverable |
See API | org.xmlBlaster.util.plugin.I_Plugin |
See REQ | mime.plugin.accessfilter |
See REQ | mime.plugin.access.regex |
See REQ | util.property.env |
See TEST | org.xmlBlaster.test.mime.TestSubscribeFilter |
See TEST | org.xmlBlaster.test.mime.TestGetFilter |
This page is generated from the requirement XML file xmlBlaster/doc/requirements/mime.plugin.accessfilter.howto.xml