Class SaAbstractJMXProperties

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CFG_FILE
      Config file tag.
      static java.lang.String PASSWORD_REPLACEMENT
      Replacement for password shown in jconsole.
      static java.lang.String PASSWORD_SUFFIX
      Suffix of password property names.
      • Fields inherited from class java.util.Properties

        defaults
    • Constructor Summary

      Constructors 
      Constructor Description
      SaAbstractJMXProperties​(java.lang.String configName)
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract javax.management.MBeanAttributeInfo[] constructAttributes()
      Construct attributes.
      protected abstract javax.management.MBeanConstructorInfo[] constructConstructors()
      Construct constructors.
      protected abstract javax.management.MBeanOperationInfo[] constructOperations()
      Construct Operations.
      java.lang.Object getAttribute​(java.lang.String attribute)
      javax.management.AttributeList getAttributes​(java.lang.String[] attributes)
      protected java.io.InputStream getConfigStream​(java.lang.String configuration)
      Tries to read the source from different destinations.
      javax.management.MBeanInfo getMBeanInfo()
      protected abstract java.lang.Object handleInvoke​(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
      Invoke handling.
      java.lang.Object invoke​(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
      protected boolean isWriteable()  
      protected void register​(java.lang.String className)
      Register bean.
      void setAttribute​(javax.management.Attribute attribute)
      javax.management.AttributeList setAttributes​(javax.management.AttributeList attributes)
      protected void setWriteable​(boolean value)  
      • Methods inherited from class java.util.Properties

        clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • PASSWORD_SUFFIX

        public static final java.lang.String PASSWORD_SUFFIX
        Suffix of password property names.
        See Also:
        Constant Field Values
      • PASSWORD_REPLACEMENT

        public static final java.lang.String PASSWORD_REPLACEMENT
        Replacement for password shown in jconsole.
        See Also:
        Constant Field Values
      • CFG_FILE

        public static final java.lang.String CFG_FILE
        Config file tag.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SaAbstractJMXProperties

        public SaAbstractJMXProperties​(java.lang.String configName)
        Constructor.
        Parameters:
        configName - Name
    • Method Detail

      • isWriteable

        protected boolean isWriteable()
        Returns:
        is writable
      • setWriteable

        protected void setWriteable​(boolean value)
        Parameters:
        value - Writable
      • getConfigStream

        protected java.io.InputStream getConfigStream​(java.lang.String configuration)
                                               throws java.io.IOException
        Tries to read the source from different destinations.
        Parameters:
        configuration - The source file name
        Returns:
        The input stream of this source
        Throws:
        java.io.IOException - in case of configuration file does not exist.
      • register

        protected void register​(java.lang.String className)
        Register bean.
        Parameters:
        className - Class name
      • constructAttributes

        protected abstract javax.management.MBeanAttributeInfo[] constructAttributes()
        Construct attributes.
        Returns:
        Attribute infos
      • constructOperations

        protected abstract javax.management.MBeanOperationInfo[] constructOperations()
        Construct Operations.
        Returns:
        Operation infos
      • constructConstructors

        protected abstract javax.management.MBeanConstructorInfo[] constructConstructors()
        Construct constructors.
        Returns:
        Constructor infos
      • handleInvoke

        protected abstract java.lang.Object handleInvoke​(java.lang.String actionName,
                                                         java.lang.Object[] params,
                                                         java.lang.String[] signature)
                                                  throws javax.management.MBeanException,
                                                         javax.management.ReflectionException
        Invoke handling.
        Parameters:
        actionName - Action name
        params - Parameters
        signature - Signatures
        Returns:
        Handle object
        Throws:
        javax.management.MBeanException - MBeanException
        javax.management.ReflectionException - ReflectionException
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String attribute)
                                      throws javax.management.AttributeNotFoundException,
                                             javax.management.MBeanException,
                                             javax.management.ReflectionException
        Specified by:
        getAttribute in interface javax.management.DynamicMBean
        Throws:
        javax.management.AttributeNotFoundException
        javax.management.MBeanException
        javax.management.ReflectionException
        See Also:
        DynamicMBean.getAttribute(java.lang.String)
      • getAttributes

        public javax.management.AttributeList getAttributes​(java.lang.String[] attributes)
        Specified by:
        getAttributes in interface javax.management.DynamicMBean
        See Also:
        DynamicMBean.getAttributes(java.lang.String[])
      • getMBeanInfo

        public javax.management.MBeanInfo getMBeanInfo()
        Specified by:
        getMBeanInfo in interface javax.management.DynamicMBean
        See Also:
        DynamicMBean.getMBeanInfo()
      • invoke

        public java.lang.Object invoke​(java.lang.String actionName,
                                       java.lang.Object[] params,
                                       java.lang.String[] signature)
                                throws javax.management.MBeanException,
                                       javax.management.ReflectionException
        Specified by:
        invoke in interface javax.management.DynamicMBean
        Throws:
        javax.management.MBeanException
        javax.management.ReflectionException
        See Also:
        DynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])
      • setAttribute

        public void setAttribute​(javax.management.Attribute attribute)
                          throws javax.management.AttributeNotFoundException,
                                 javax.management.InvalidAttributeValueException,
                                 javax.management.MBeanException,
                                 javax.management.ReflectionException
        Specified by:
        setAttribute in interface javax.management.DynamicMBean
        Throws:
        javax.management.AttributeNotFoundException
        javax.management.InvalidAttributeValueException
        javax.management.MBeanException
        javax.management.ReflectionException
        See Also:
        DynamicMBean.setAttribute(javax.management.Attribute)
      • setAttributes

        public javax.management.AttributeList setAttributes​(javax.management.AttributeList attributes)
        Specified by:
        setAttributes in interface javax.management.DynamicMBean
        See Also:
        DynamicMBean.setAttributes(javax.management.AttributeList)