Class BootstrapProperties

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,​java.lang.Object>

    public class BootstrapProperties
    extends java.util.Properties
    This class holds the necessary information for startup and provides a extra method for getting the available adapter configuration.
    See Also:
    Serialized Form
    • Constructor Detail

      • BootstrapProperties

        public BootstrapProperties()
      • BootstrapProperties

        public BootstrapProperties​(java.lang.String resourceName)
      • BootstrapProperties

        public BootstrapProperties​(java.util.Properties p)
    • Method Detail

      • getProperty

        public java.lang.Long getProperty​(java.lang.String key,
                                          java.lang.Long defaultValue)
        Add overloaded method to get numerical values from bootstrap.properties.
        Parameters:
        key - The property key to get.
        defaultValue - The default numerical value if the key isn't found (or cannot be parsed as numercial).
        Returns:
        The numerical value for the given property key, or default if necessary.
      • createAdapter

        @Deprecated
        public Adapter createAdapter()
                              throws java.lang.Exception
        Deprecated.
        use getConfigManager() to create an AdapterManagerMBean instead.
        Convenience method to create an adapter based on the existing bootstrap properties
        Returns:
        the adapter object.
        Throws:
        java.lang.Exception - if an exception occured.
      • getConfigurationStream

        public java.io.InputStream getConfigurationStream()
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getConfigurationUrls

        public java.lang.String[] getConfigurationUrls()
      • findAdapterResource

        public java.lang.String findAdapterResource()
      • isPrimaryUrlAvailable

        public boolean isPrimaryUrlAvailable()
      • getPrimaryUrl

        public URLString getPrimaryUrl()
      • getConfigManager

        public AdapterConfigManager getConfigManager()
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • reconfigureLogging

        public void reconfigureLogging()
      • isEnabled

        public boolean isEnabled​(java.lang.String key)
      • isEnabled

        public static boolean isEnabled​(java.util.Properties p,
                                        java.lang.String key)