Improve `XmppModulesManager` API (#74)
Andrzej Wójcik (Tigase) opened 4 years ago

Current API for retrieval of registered XmppModule is problematic. Retrieval is done by ID (String) and result object is being casted on the type of variable to which property is assigned.

It would be far better to be able to provide a class/struct (or ID of a type which has class assigned) as a parameter and retrieve a module of that type. It would be good to have 2 methods:

  • returning module of correct type or crashing (for usage in clients or in libraries where there is no point to work with missing modules
  • returning optional module of correct type (for places when we can properly work without particular mode - its availability is optional)
issue 1 of 1
Type
Task
Priority
Normal
Assignee
Version
3.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_libraries/Martin#74
Please wait...
Page is in error, reload to recover