Removed ClasspathConfig to use the ClasspathResourceLoader and basic ResourceLoaderConfig
Removed FilesystemConfig to use the FileResourceLoader and basic ResourceLoaderConfig
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2015 The original author or authors
|
||||
* ------------------------------------------------------
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Apache License v2.0 which accompanies this distribution.
|
||||
*
|
||||
* The Eclipse Public License is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* The Apache License v2.0 is available at
|
||||
* http://www.opensource.org/licenses/apache2.0.php
|
||||
*
|
||||
* You may elect to redistribute this code under either of these licenses.
|
||||
*/
|
||||
package io.moquette.server.config;
|
||||
|
||||
/**
|
||||
* Configuration that loads file from the classpath
|
||||
*
|
||||
* @author andrea
|
||||
*/
|
||||
public class ClasspathConfig extends ResourceLoaderConfig {
|
||||
|
||||
public ClasspathConfig() {
|
||||
super(new ClasspathResourceLoader());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012-2015 The original author or authors
|
||||
* ------------------------------------------------------
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* and Apache License v2.0 which accompanies this distribution.
|
||||
*
|
||||
* The Eclipse Public License is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* The Apache License v2.0 is available at
|
||||
* http://www.opensource.org/licenses/apache2.0.php
|
||||
*
|
||||
* You may elect to redistribute this code under either of these licenses.
|
||||
*/
|
||||
package io.moquette.server.config;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Configuration that loads file from the file system
|
||||
*
|
||||
* @author andrea
|
||||
*/
|
||||
public class FilesystemConfig extends ResourceLoaderConfig {
|
||||
|
||||
public FilesystemConfig(File file) {
|
||||
super(new FileResourceLoader(file));
|
||||
}
|
||||
|
||||
public FilesystemConfig() {
|
||||
this(defaultConfigFile());
|
||||
}
|
||||
|
||||
private static File defaultConfigFile() {
|
||||
String configPath = System.getProperty("moquette.path", null);
|
||||
return new File(configPath, IConfig.DEFAULT_CONFIG);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user