Examples of PluginInfo


Examples of org.xmlBlaster.util.plugin.PluginInfo

    * 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);
        
      }
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

         String qos = (isQos) ? xml : "<qos/>";
         MsgUnit msgUnit = new MsgUnit("<key oid='Hello'/>", content, qos);
         msgUnit.getQosData().setRcvTimestamp(new Timestamp());
         SessionInfo sessionInfo = null;

         PluginInfo info = new PluginInfo(glob, null, "XPathFilter", "1.0");
         info.getParameters().put(MATCH_AGAINST_QOS, ""+isQos);
         if (xslFile != null)
            info.getParameters().put(XSL_CONTENT_TRANSFORMER_FILE_NAME, xslFile);
         filter.init(glob, info);
        
         BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        
         System.out.println("The XML to query is");
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

   /**
    * returns the PluginInfo object out of this configuration
    */
   public PluginInfo getPluginInfo() {
      return new PluginInfo(this.glob, this.id, this.className, this.attributes);
   }
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

   /**
    * @see #getPlugin(String, String, StorageId, QueuePropertyBase)
    */
   public I_Queue getPlugin(String typeVersion, StorageId storageId, QueuePropertyBase props) throws XmlBlasterException {
      return getPlugin(new PluginInfo(glob, this, typeVersion,
              new ContextNode(this.pluginEnvClass, storageId.getRelatingType(), glob.getContextNode())),
              storageId, props);
   }
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

    * @param String The version of the requested plugin.
    * @param fn The file name for persistence or null (will be generated or ignored if RAM based)
    * @return The plugin for this type and version or null if none is specified or type=="undef"
    */
   public I_Queue getPlugin(String type, String version, StorageId storageId, QueuePropertyBase props) throws XmlBlasterException {
      return getPlugin(new PluginInfo(glob, this, type, version,
              new ContextNode(this.pluginEnvClass, storageId.getRelatingType(), glob.getContextNode())),
              storageId, props);
   }
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

         PropString defaultPlugin = new PropString(this.type.getDefaultValue()+","+this.version.getDefaultValue());
         // Port to linked ContextNode?
         propName = defaultPlugin.setFromEnv(this.glob, nodeId, context, getRootTagName(), relating, "defaultPlugin");
         if (log.isLoggable(Level.FINE)) log.fine("Lookup of nodeId=" + nodeId + " context=" + context + " getRootTagName=" + getRootTagName() +
             " relating=" + relating + " propName=" + propName + " defaultValue=" + defaultPlugin.getValue());
         PluginInfo pluginInfo = new PluginInfo(glob, null, defaultPlugin.getValue());
         if (defaultPlugin.isModified()) {
            setType(pluginInfo.getType());
            setVersion(pluginInfo.getVersion());
         }
         else {
            this.type.setDefaultValue(pluginInfo.getType());
            this.version.setDefaultValue(pluginInfo.getVersion());
         }
      }
      catch (XmlBlasterException ex) {
         log.severe("initialize: could not set the default plugin to what indicated by "+propName);
      }
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

            continue;
         }
         if (log.isLoggable(Level.FINEST)) log.finest("startupPlugins " + pluginConfig.toXml());
         try {
            long startTime = System.currentTimeMillis();
            PluginInfo pluginInfo = pluginConfig.getPluginInfo();
            if (log.isLoggable(Level.FINER)) {
               if (pluginInfo != null) {
                  log.finer("startupPlugins pluginInfo object: " + pluginInfo.getId() + " classname: " + pluginInfo.getClassName());
               }
               else log.finer("startupPlugins: the pluginInfo is null");
            }
            this.glob.getPluginManager().getPluginObject(pluginInfo);
            long deltaTime = System.currentTimeMillis() - startTime;
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

         PluginConfig pluginConfig = (PluginConfig)iter.next();
         if (pluginConfig == null || !pluginConfig.isCreate())
            continue;

         try {
            PluginInfo pluginInfo = pluginConfig.getPluginInfo();
            I_Plugin plugin = this.glob.getPluginManager().getPluginObject(pluginInfo);
            plugin.shutdown();
            this.glob.getPluginManager().removeFromPluginCache(pluginInfo.getId());
            log.fine("fireRunlevelEvent: run level '" + from + "' to '" + to + "' plugin '" + pluginConfig.getId() + "' shutdown");
         }
         catch (Throwable ex) {
            ErrorCode code = pluginConfig.getDownAction().getOnFail();
            if (code == null) {
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

      try {
         String type = PLUGIN_TYPES[currImpl];
         this.glob.getProperty().set("cb.queue.persistent.tableNamePrefix", "TEST");
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, type, "1.0");
         java.util.Properties prop = (java.util.Properties)pluginInfo.getParameters();
         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");

         CbQueueProperty cbProp = new CbQueueProperty(glob, Constants.RELATING_CALLBACK, "/node/test");
         StorageId queueId = new StorageId(glob, Constants.RELATING_CALLBACK, "SetupQueue");
View Full Code Here

Examples of org.xmlBlaster.util.plugin.PluginInfo

      try {
         String type = PLUGIN_TYPES[this.count];
         this.glob.getProperty().set("cb.queue.persistent.tableNamePrefix", "TEST");
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, type, "1.0");
         java.util.Properties prop = (java.util.Properties)pluginInfo.getParameters();
         prop.put("tableNamePrefix", "TEST");
         prop.put("entriesTableName", "_entries");
         I_Queue tmpQueue = pluginManager.getPlugin(pluginInfo, queueId, cbProp);
         tmpQueue.clear();
         // add some persistent entries and then shutdown ...
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.