[
https://issues.apache.org/jira/browse/QPID-2705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883533#action_12883533
]
Danushka Menikkumbura commented on QPID-2705:
---------------------------------------------
Basically we need a factory class inside each plug-in to expose methods to
create objects of whatever the required classes. For that matter I suggest we
have the following simple implementation. Maybe we can modify the existing
Plugin class.
1. We have an interface that must be implemented by each plug-in.
2. In that interface we have a String array to hold names of classes that are
exported by each plug-in.
3. Each plug-in should also provide a method to create new instances of each
factory class
E.g. If you have a factory class called a.b.c.MyClass then your plug-in
should posses a method called createNewMyClass that creates a new instance of
MyClass. The plug-in manager will go through the list and call createNewX for
each class to create factories.
4. We may also have an enum for each factory so that you can retrieve different
factories from the plug-in manager.
5. We also need an entry in the manifest to mention the plug-in factory class
name. That is your implementation of the plug-in interface. The plug-in manger
will make use of this to load the class at runtime.
The current plug-in manager have method to retrieve security plugins
(getSecurityPlugins), configuration plug-ins (getConfigurationPlugins), etc. We
can continue to have them or have a single call with plug-in type to retrieve
plug-in factories.
Thanks,
Danushka
> Need a new Plug-in Architecture for the Java Broker
> ---------------------------------------------------
>
> Key: QPID-2705
> URL: https://issues.apache.org/jira/browse/QPID-2705
> Project: Qpid
> Issue Type: Improvement
> Reporter: Danushka Menikkumbura
> Assignee: Danushka Menikkumbura
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]