Class: ModernTimes::Base::SupervisorMBean

Inherits:
RubyDynamicMBean
  • Object
show all
Defined in:
lib/modern_times/base/supervisor_mbean.rb

Direct Known Subclasses

JMS::SupervisorMBean

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, description, supervisor, options) ⇒ SupervisorMBean

Returns a new instance of SupervisorMBean.



10
11
12
13
# File 'lib/modern_times/base/supervisor_mbean.rb', line 10

def initialize(name, description, supervisor, options)
  super(name, description)
  @supervisor = supervisor
end

Instance Attribute Details

#supervisorObject (readonly)

Returns the value of attribute supervisor.



6
7
8
# File 'lib/modern_times/base/supervisor_mbean.rb', line 6

def supervisor
  @supervisor
end

Instance Method Details

#worker_countObject



15
16
17
# File 'lib/modern_times/base/supervisor_mbean.rb', line 15

def worker_count
  supervisor.worker_count
end

#worker_count=(count) ⇒ Object



19
20
21
# File 'lib/modern_times/base/supervisor_mbean.rb', line 19

def worker_count=(count)
  supervisor.worker_count = count
end

#worker_statusesObject



23
24
25
# File 'lib/modern_times/base/supervisor_mbean.rb', line 23

def worker_statuses
  java.util.ArrayList.new(supervisor.worker_statuses)
end