Class AttributeProxy<T>

  • Type Parameters:
    T - the return type/set type for the attribute
    Direct Known Subclasses:
    BooleanBeanProxy, DoubleBeanProxy, LongBeanProxy, StringBeanProxy

    public abstract class AttributeProxy<T>
    extends java.lang.Object
    The Class AttributeProxy, used to proxy operations from a dynamic mbean to a POJO object. Override get()/set() as needed.
    Author:
    cschanck
    • Constructor Summary

      Constructors 
      Constructor Description
      AttributeProxy​(java.lang.Class<T> clazz, java.lang.String name, java.lang.String description, boolean isRead, boolean isWrite)
      Instantiates a new attribute proxy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get​(java.lang.String name)
      Gets the value.
      java.lang.String getDescription()
      Gets the description.
      java.lang.String getName()
      Gets the name.
      java.lang.Class<?> getTypeClass()
      Gets the type class.
      boolean isRead()
      Checks if is readable.
      boolean isWrite()
      Checks if is writable.
      void set​(java.lang.String name, T t)
      Sets the value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AttributeProxy

        public AttributeProxy​(java.lang.Class<T> clazz,
                              java.lang.String name,
                              java.lang.String description,
                              boolean isRead,
                              boolean isWrite)
        Instantiates a new attribute proxy.
        Parameters:
        clazz - the clazz of the return type
        name - the name
        description - the description
        isRead - readable
        isWrite - writable
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Gets the description.
        Returns:
        the description
      • getTypeClass

        public java.lang.Class<?> getTypeClass()
        Gets the type class.
        Returns:
        the type class
      • getName

        public java.lang.String getName()
        Gets the name.
        Returns:
        the name
      • get

        public T get​(java.lang.String name)
        Gets the value.
        Parameters:
        name - the name
        Returns:
        the value
      • set

        public void set​(java.lang.String name,
                        T t)
        Sets the value.
        Parameters:
        name - the name
        t - the value
      • isRead

        public boolean isRead()
        Checks if is readable.
        Returns:
        true, if is read
      • isWrite

        public boolean isWrite()
        Checks if is writable.
        Returns:
        true, if is writable