Examples of FileLookup


Examples of org.infinispan.util.FileLookup

         }
      }
   }

   public ConfigurationBuilderHolder parseFile(String filename) throws IOException {
      FileLookup fileLookup = FileLookupFactory.newInstance();
      InputStream is = fileLookup.lookupFile(filename, cl.get());
      if(is==null) {
         throw new FileNotFoundException(filename);
      }
      try {
         return parse(is);
View Full Code Here

Examples of org.infinispan.util.FileLookup

   public void setAsyncExecutorFactory(ExecutorFactory asyncExecutorFactory) {
      this.asyncExecutorFactory = asyncExecutorFactory;
   }

   public void setHotRodClientPropertiesFile(String hotRodClientPropertiesFile) {
      FileLookup fileLookup = FileLookupFactory.newInstance();
      InputStream inputStream = fileLookup.lookupFile(hotRodClientPropertiesFile, getClassLoader());
      try {
         hotRodClientProperties.load(inputStream);
      } catch (IOException e) {
         log.error("Issues while loading properties from file " + hotRodClientPropertiesFile, e);
         throw new CacheException(e);
View Full Code Here

Examples of org.infinispan.util.FileLookup

   public EmbeddedCacheManager getCacheManager() {
      return this.cacheManager;
   }

   private String findConfigFile(String configFile) {
      FileLookup fl = FileLookupFactory.newInstance();
      if (configFile != null) {
         InputStream inputStream = fl.lookupFile(configFile, Thread.currentThread().getContextClassLoader());
         try {
            if (inputStream != null)
               return configFile;
         } finally {
            Util.close(inputStream);
View Full Code Here

Examples of org.jboss.cache.util.FileLookup

    *
    * @see org.jboss.cache.util.FileLookup
    */
   public Configuration parseFile(String filename)
   {
      InputStream is = new FileLookup().lookupFile(filename);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + filename + " either in classpath or on the filesystem!");
      }
      return parseStream(is);
View Full Code Here

Examples of org.jboss.cache.util.FileLookup

      // first see if a configFile is provided
      String cfgFile = getAttributeValue(element, "configFile");
      if (existsAttribute(cfgFile))
      {
         // try and load this file
         URL u = new FileLookup().lookupFileLocation(cfgFile);
         config.setJgroupsConfigFile(u);
      }
      else
      {
         String multiplexerStack = getAttributeValue(element, "multiplexerStack");
View Full Code Here

Examples of org.jboss.cache.util.FileLookup

    *
    * @see org.jboss.cache.util.FileLookup
    */
   public Configuration parseFile(String filename)
   {
      InputStream is = new FileLookup().lookupFile(filename);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + filename + " either in classpath or on the filesystem!");
      }
      return parseStream(is);
View Full Code Here

Examples of org.jboss.cache.util.FileLookup

      // first see if a configFile is provided
      String cfgFile = getAttributeValue(element, "configFile");
      if (existsAttribute(cfgFile))
      {
         // try and load this file
         URL u = new FileLookup().lookupFileLocation(cfgFile);
         config.setJgroupsConfigFile(u);
      }
      else
      {
         String multiplexerStack = getAttributeValue(element, "multiplexerStack");
View Full Code Here

Examples of org.jboss.cache.util.FileLookup

   private static final Log log = LogFactory.getLog(CacheConfigsXmlParser.class);


   public Map<String, Configuration> parseConfigs(String fileName) throws CloneNotSupportedException
   {
      FileLookup fileLookup = new FileLookup();
      InputStream is = fileLookup.lookupFile(fileName);
      if (is == null)
      {
         throw new ConfigurationException("Unable to find config file " + fileName + " either in classpath or on the filesystem!");
      }
View Full Code Here

Examples of org.jboss.cache.util.FileLookup

    * as <b>is</b>. Transformation is performed according to the <b>xsltFile</b>. The xslt file is looked up using a
    * {@link org.jboss.cache.util.FileLookup}
    */
   public void parse(InputStream is, OutputStream os, String xsltFile) throws Exception
   {
      InputStream xsltInStream = new FileLookup().lookupFile(xsltFile);

      Document document = getInputDocument(is);

      // Use a Transformer for output
      Transformer transformer = getTransformer(xsltInStream);
View Full Code Here

Examples of org.jboss.cache.util.FileLookup

    * as <b>inputFile</b>. Transformation is performed according to the <b>xsltFile</b>. Both <b>inputFile</b> and he xslt
    * file are looked up using a {@link org.jboss.cache.util.FileLookup}
    */
   public void parse(String inputFile, OutputStream os, String xsltFile) throws Exception
   {
      InputStream stream = new FileLookup().lookupFile(inputFile);
      try
      {
         parse(stream, os, xsltFile);
      }
      finally
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.