Package io.hawt.config
Class ConfigFacade
- java.lang.Object
-
- io.hawt.util.MBeanSupport
-
- io.hawt.config.ConfigFacade
-
- All Implemented Interfaces:
ConfigFacadeMBean
public class ConfigFacade extends io.hawt.util.MBeanSupport implements ConfigFacadeMBean
A facade for the hawtio configuration features.
-
-
Constructor Summary
Constructors Constructor Description ConfigFacade()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUrlHandler(String protocol, URLHandler handler)StringgetConfigDir()Returns the fully qualified path name where configuration is written.FilegetConfigDirectory()Returns the configuration directory; lazily attempting to create it if it does not yet existprotected StringgetDefaultObjectName()static ConfigFacadegetSingleton()URLHandlergetUrlHandler(String protocol)StringgetVersion()Returns the hawtio versionvoidinit()InputStreamopenURL(String url)voidremoveUrlHandler(String protocol)voidsetConfigDir(String configDir)
-
-
-
Method Detail
-
getSingleton
public static ConfigFacade getSingleton()
-
init
public void init() throws Exception- Overrides:
initin classio.hawt.util.MBeanSupport- Throws:
Exception
-
getDefaultObjectName
protected String getDefaultObjectName()
- Specified by:
getDefaultObjectNamein classio.hawt.util.MBeanSupport
-
getVersion
public String getVersion()
Description copied from interface:ConfigFacadeMBeanReturns the hawtio version- Specified by:
getVersionin interfaceConfigFacadeMBean
-
getConfigDirectory
public File getConfigDirectory()
Returns the configuration directory; lazily attempting to create it if it does not yet exist
-
getConfigDir
public String getConfigDir()
Description copied from interface:ConfigFacadeMBeanReturns the fully qualified path name where configuration is written.- Specified by:
getConfigDirin interfaceConfigFacadeMBean
-
setConfigDir
public void setConfigDir(String configDir)
-
openURL
public InputStream openURL(String url) throws IOException
- Throws:
IOException
-
getUrlHandler
public URLHandler getUrlHandler(String protocol)
-
addUrlHandler
public void addUrlHandler(String protocol, URLHandler handler)
-
removeUrlHandler
public void removeUrlHandler(String protocol)
-
-