Class: ManageEngine::APMObjectHolder
- Inherits:
-
Object
- Object
- ManageEngine::APMObjectHolder
- Defined in:
- lib/agent/am_objectholder.rb
Constant Summary collapse
- @@objects =
nil
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#agent_initialized ⇒ Object
Returns the value of attribute agent_initialized.
-
#collector ⇒ Object
readonly
Returns the value of attribute collector.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#connector ⇒ Object
readonly
Returns the value of attribute connector.
-
#constants ⇒ Object
readonly
Returns the value of attribute constants.
-
#formatter ⇒ Object
Returns the value of attribute formatter.
-
#instrumenter ⇒ Object
Returns the value of attribute instrumenter.
-
#last_dispatch_time ⇒ Object
Returns the value of attribute last_dispatch_time.
-
#log ⇒ Object
readonly
Returns the value of attribute log.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#shutdown ⇒ Object
Returns the value of attribute shutdown.
-
#store ⇒ Object
Returns the value of attribute store.
-
#util ⇒ Object
readonly
Returns the value of attribute util.
Class Method Summary collapse
Instance Method Summary collapse
-
#initializeObjects ⇒ Object
Don’t Change the Order of Initialize.
- #shutdownagent ⇒ Object
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def agent @agent end |
#agent_initialized ⇒ Object
Returns the value of attribute agent_initialized.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def agent_initialized @agent_initialized end |
#collector ⇒ Object (readonly)
Returns the value of attribute collector.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def collector @collector end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def config @config end |
#connector ⇒ Object (readonly)
Returns the value of attribute connector.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def connector @connector end |
#constants ⇒ Object (readonly)
Returns the value of attribute constants.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def constants @constants end |
#formatter ⇒ Object
Returns the value of attribute formatter.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def formatter @formatter end |
#instrumenter ⇒ Object
Returns the value of attribute instrumenter.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def instrumenter @instrumenter end |
#last_dispatch_time ⇒ Object
Returns the value of attribute last_dispatch_time.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def last_dispatch_time @last_dispatch_time end |
#log ⇒ Object (readonly)
Returns the value of attribute log.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def log @log end |
#parser ⇒ Object
Returns the value of attribute parser.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def parser @parser end |
#shutdown ⇒ Object
Returns the value of attribute shutdown.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def shutdown @shutdown end |
#store ⇒ Object
Returns the value of attribute store.
18 19 20 |
# File 'lib/agent/am_objectholder.rb', line 18 def store @store end |
#util ⇒ Object (readonly)
Returns the value of attribute util.
17 18 19 |
# File 'lib/agent/am_objectholder.rb', line 17 def util @util end |
Class Method Details
.instance ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/agent/am_objectholder.rb', line 40 def self.instance if(@@objects==nil) @@objects = ManageEngine::APMObjectHolder.new @@objects.initializeObjects end return @@objects end |
Instance Method Details
#initializeObjects ⇒ Object
Don’t Change the Order of Initialize
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/agent/am_objectholder.rb', line 21 def initializeObjects @agent_initialized = false @shutdown = false @constants = ManageEngine::APMConstants.new @log = ManageEngine::APMLogger.new @util = ManageEngine::APMUtil.new @util.setLogger @log @config = ManageEngine::APMConfig.new @connector = ManageEngine::APMConnector.new @store = ManageEngine::APMMetricsStore.new @collector = ManageEngine::APMMetricsCollector.new @instrumenter = ManageEngine::APMInstrumenter.new @formatter = ManageEngine::APMMetricsFormatter.new @parser = ManageEngine::APMMetricsParser.new @agent = ManageEngine::APMAgent.new @last_dispatch_time = @@objects.util.currenttimemillis @@objects.log.debug "[APMObjectHolder] [ All Objects Initialized ] " end |
#shutdownagent ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/agent/am_objectholder.rb', line 48 def shutdownagent ###@agent_initialized=false #@shutdown = true #@constants = nil #@util = nil #@config = nil #@connector = nil #@store = nil #@collector=nil #@instrumenter = nil #@formatter = nil #@parser = nil #@agent = nil #@log.info "[ APMObjectHolder ][ All Objects deleted ] " #@log = nil end |