📄 msgdistributorpluginmanager.java
字号:
/*------------------------------------------------------------------------------Name: MsgDistributorPluginManager.javaProject: xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE file------------------------------------------------------------------------------*/package org.xmlBlaster.engine.distributor.plugins;import org.xmlBlaster.engine.TopicHandler;import org.xmlBlaster.engine.distributor.I_MsgDistributor;import org.xmlBlaster.util.Global;import org.xmlBlaster.util.XmlBlasterException;import org.xmlBlaster.util.plugin.PluginInfo;import org.xmlBlaster.util.plugin.PluginManagerBase;/** * MsgDistributorPluginManager * * @author <a href="mailto:michele@laghi.eu">Michele Laghi</a> * */public class MsgDistributorPluginManager extends PluginManagerBase { /** the default class name to use if nothing specified */ private static final String defaultPluginName = "org.xmlBlaster.engine.distributor.plugins.ConsumableQueuePlugin"; /** This is the prefix of the name used in xmlBlaster.properties to register the plugins of this type */ public static final String pluginPropertyName = "MsgDistributorPlugin"; public MsgDistributorPluginManager(Global glob) { super(glob); } /** * Return a specific msgDistributor plugin. * <p/> * This PluginManager exists once in the scope of a Global instance (check util.Global) * @param typeVersion The type and version e.g. "ConsumableQueue,1.0" * @return null if no plugin was loaded */ public I_MsgDistributor getPlugin(String typeVersion, TopicHandler topicHandler) throws XmlBlasterException { PluginInfo pluginInfo = new PluginInfo(getGlobal(), this, typeVersion); pluginInfo.setUserData(topicHandler); // transport to init // return (I_MsgDistributor)getPluginObject(pluginInfo); return (I_MsgDistributor)this.instantiatePlugin(pluginInfo); } /** * Enforced by PluginManagerBase. * @return The name of the property in xmlBlaster.property "MsgDistributorPlugin" * for "MsgDistributorPlugin[ConsumableQueue][1.0]" */ public String getPluginPropertyName() { return pluginPropertyName; } /** * @return please return your default plugin class name or null if not specified */ public String getDefaultPluginName(String type, String version) { return defaultPluginName; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -