Package org.xmlBlaster.util.plugin

Examples of org.xmlBlaster.util.plugin.PluginInfo


   /**
    * @see #getPlugin(String, String, StorageId, QueuePropertyBase)
    */
   public I_Map 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


    * @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_Map getPlugin(String type, String version, StorageId storageId, QueuePropertyBase props) throws XmlBlasterException {
      if (log.isLoggable(Level.FINER)) log.finer("getPlugin(type="+type+", version="+version+", storageId="+storageId+", pluginEnvClass="+this.pluginEnvClass+")");
      return getPlugin(new PluginInfo(glob, this, type, version,
                                      new ContextNode(this.pluginEnvClass, storageId.getRelatingType(), glob.getContextNode())),
                       storageId, props);
   }
View Full Code Here

   public static XBDatabaseAccessor createInstance(Global glob, String confType, String confVersion, Properties properties)
      throws XmlBlasterException {
      if (confType == null) confType = "JDBC";
      if (confVersion == null) confVersion = "1.0";
      QueuePluginManager pluginManager = new QueuePluginManager(glob);
      PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, confType, confVersion);
      // clone the properties (to make sure they only belong to us) ...
      java.util.Properties ownProperties = (java.util.Properties)pluginInfo.getParameters().clone();
      //overwrite our onw properties ...
      if (properties != null) {
         java.util.Enumeration enumer = properties.keys();
         while (enumer.hasMoreElements()) {
            String key = (String) enumer.nextElement();
            ownProperties.put(key, properties.getProperty(key));
         }
      }

      // determine which jdbc manager class to use
      String queueClassName = pluginInfo.getClassName();
      if ("org.xmlBlaster.util.queue.jdbc.JdbcQueuePlugin".equals(queueClassName)) {
         throw new XmlBlasterException(glob, ErrorCode.INTERNAL_NOTIMPLEMENTED, ME, "org.xmlBlaster.util.queue.jdbc.JdbcQueuePlugin is not supported anymore");
      }
      else if ("org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin".equals(queueClassName)) {
         throw new XmlBlasterException(glob, ErrorCode.INTERNAL_NOTIMPLEMENTED, ME, "org.xmlBlaster.util.queue.jdbc.JdbcQueueCommonTablePlugin is not supported anymore");
View Full Code Here

    * 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

         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

   /**
    * 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

   /**
    * @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

    * @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

         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

            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

TOP

Related Classes of org.xmlBlaster.util.plugin.PluginInfo

Copyright © 2018 www.massapicom. 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.