Class: Backstage::Service
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Resource
#association_chain, included, #resource, #to_hash
#app, #app_name, #name, #status
Methods included from HasMBean
#<=>, #full_name, included, #initialize, #mbean_info, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Backstage::HasMBean
Class Method Details
23
24
25
|
# File 'lib/services/models/service.rb', line 23
def self.filter
"torquebox.services:*"
end
|
.to_hash_attributes ⇒ Object
27
28
29
|
# File 'lib/services/models/service.rb', line 27
def self.to_hash_attributes
super + [:name, :app, :app_name, :status]
end
|
Instance Method Details
#available_actions ⇒ Object
41
42
43
|
# File 'lib/services/models/service.rb', line 41
def available_actions
status == 'Started' ? %w{ stop } : %w{ start }
end
|
31
32
33
34
|
# File 'lib/services/models/service.rb', line 31
def start
super
self
end
|
36
37
38
39
|
# File 'lib/services/models/service.rb', line 36
def stop
super
self
end
|