Class: JMX::Attribute

Inherits:
Struct
  • Object
show all
Includes:
JavaTypeAware
Defined in:
lib/jmx/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.



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

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



61
62
63
# File 'lib/jmx/dynamic_mbean.rb', line 61

def description
  @description
end

#is_iserObject

Returns the value of attribute is_iser

Returns:

  • (Object)

    the current value of is_iser



61
62
63
# File 'lib/jmx/dynamic_mbean.rb', line 61

def is_iser
  @is_iser
end

#is_readerObject

Returns the value of attribute is_reader

Returns:

  • (Object)

    the current value of is_reader



61
62
63
# File 'lib/jmx/dynamic_mbean.rb', line 61

def is_reader
  @is_reader
end

#is_writerObject

Returns the value of attribute is_writer

Returns:

  • (Object)

    the current value of is_writer



61
62
63
# File 'lib/jmx/dynamic_mbean.rb', line 61

def is_writer
  @is_writer
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



61
62
63
# File 'lib/jmx/dynamic_mbean.rb', line 61

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



61
62
63
# File 'lib/jmx/dynamic_mbean.rb', line 61

def type
  @type
end

Instance Method Details

#to_jmxObject



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

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