Class: JMX::Attribute

Inherits:
Struct
  • Object
show all
Includes:
JavaTypeAware
Defined in:
lib/dynamic_mbean.rb

Constant Summary

Constants included from JavaTypeAware

JavaTypeAware::SIMPLE_TYPES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from JavaTypeAware

#to_java_type, #to_ruby

Constructor Details

#initialize(name, type, description, is_rdr, is_wrtr) ⇒ Attribute

Returns a new instance of Attribute.



68
69
70
71
72
# File 'lib/dynamic_mbean.rb', line 68

def initialize(name, type, description, is_rdr, is_wrtr)
  super
  self.description, self.type, self.name = description, type, name
  self.is_reader,self.is_writer, self.is_iser = is_rdr, is_wrtr, false
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



65
66
67
# File 'lib/dynamic_mbean.rb', line 65

def description
  @description
end

#is_iserObject

Returns the value of attribute is_iser

Returns:

  • (Object)

    the current value of is_iser



65
66
67
# File 'lib/dynamic_mbean.rb', line 65

def is_iser
  @is_iser
end

#is_readerObject

Returns the value of attribute is_reader

Returns:

  • (Object)

    the current value of is_reader



65
66
67
# File 'lib/dynamic_mbean.rb', line 65

def is_reader
  @is_reader
end

#is_writerObject

Returns the value of attribute is_writer

Returns:

  • (Object)

    the current value of is_writer



65
66
67
# File 'lib/dynamic_mbean.rb', line 65

def is_writer
  @is_writer
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



65
66
67
# File 'lib/dynamic_mbean.rb', line 65

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



65
66
67
# File 'lib/dynamic_mbean.rb', line 65

def type
  @type
end

Instance Method Details

#to_jmxObject



74
75
76
# File 'lib/dynamic_mbean.rb', line 74

def to_jmx
  MBeanAttributeInfo.new(name.to_s, to_java_type(type), description, is_reader, is_writer, is_iser)
end