Class: JMX::Operation

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(description) ⇒ Operation

Returns a new instance of Operation.



50
51
52
53
# File 'lib/jmx/dynamic_mbean.rb', line 50

def initialize(description)
  super
  self.parameters, self.impact, self.description = [], MBeanOperationInfo::UNKNOWN, description
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



47
48
49
# File 'lib/jmx/dynamic_mbean.rb', line 47

def description
  @description
end

#impactObject

Returns the value of attribute impact

Returns:

  • (Object)

    the current value of impact



47
48
49
# File 'lib/jmx/dynamic_mbean.rb', line 47

def impact
  @impact
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



47
48
49
# File 'lib/jmx/dynamic_mbean.rb', line 47

def name
  @name
end

#parametersObject

Returns the value of attribute parameters

Returns:

  • (Object)

    the current value of parameters



47
48
49
# File 'lib/jmx/dynamic_mbean.rb', line 47

def parameters
  @parameters
end

#return_typeObject

Returns the value of attribute return_type

Returns:

  • (Object)

    the current value of return_type



47
48
49
# File 'lib/jmx/dynamic_mbean.rb', line 47

def return_type
  @return_type
end

Instance Method Details

#to_jmxObject



55
56
57
58
# File 'lib/jmx/dynamic_mbean.rb', line 55

def to_jmx
  java_parameters = parameters.map { |parameter| parameter.to_jmx }
  MBeanOperationInfo.new name.to_s, description, java_parameters.to_java(javax.management.MBeanParameterInfo), to_java_type(return_type), impact
end