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.



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

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



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

def description
  @description
end

#is_iserObject

Returns the value of attribute is_iser

Returns:

  • (Object)

    the current value of is_iser



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

def is_iser
  @is_iser
end

#is_readerObject

Returns the value of attribute is_reader

Returns:

  • (Object)

    the current value of is_reader



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

def is_reader
  @is_reader
end

#is_writerObject

Returns the value of attribute is_writer

Returns:

  • (Object)

    the current value of is_writer



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

def is_writer
  @is_writer
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



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

def type
  @type
end

Instance Method Details

#to_jmxObject



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

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