Quantcast
Channel: Ignite Realtime : All Content - Openfire Dev
Viewing all articles
Browse latest Browse all 966

Custom OfflineMessageStrategy

$
0
0

For my usage of Openfire I want to implement a custom OfflineMessageStrategy that is basically store or bounce -- if the message is flagged as no-store then I want to send the bounce message but if the message can be stored then I want to let it be stored (basically another else if block in OfflineMessageStrategy.storeOffline).

 

The problem I'm seeing is how to inject my code.  OfflineMessageStategy is a module and it appears that modules are defined in XMPPServer's code and loaded before plugins, making it difficult to inject my changes in.  I would like to make my changes without modifying Openfire so that I can continue to upgrade Openfire without having to patch the source every time.

 

So I have two questions:

1. Am I missing something and there is a different extension point that I can accomplish this?

2. Would a patch to make the loading of modules controlled by a config file be welcomed?  Something like populate a set with the existing names, then load a modules.xml file from the conf directory, then iterate the set and load module for each.  There would also need to be a solution for the implementation class being different from key in the map (probably just an overloaded loadModule method).

 

Thanks,

Randy


Viewing all articles
Browse latest Browse all 966

Trending Articles